[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230423122732.31135-1-u202114568@hust.edu.cn>
Date: Sun, 23 Apr 2023 20:27:31 +0800
From: Yuchen Yang <u202114568@...t.edu.cn>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Stephen Boyd <sboyd@...eaurora.org>
Cc: hust-os-kernel-patches@...glegroups.com,
Yuchen Yang <u202114568@...t.edu.cn>,
Dongliang Mu <dzm91@...t.edu.cn>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] drivers: regulator: core: remove return value check of `regulator_init`
Smatch complains that:
regulator_init() warn: 'debugfs_root' is an error pointer or valid
According to the documentation of the debugfs_create_dir() function,
there is no need to check the return value of this function.
Just delete the dead code.
Fixes: 247514344492 ("regulator: Remove ifdefs for debugfs code")
Signed-off-by: Yuchen Yang <u202114568@...t.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@...t.edu.cn>
---
drivers/regulator/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 4fcd36055b02..b14f281b1a97 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -6109,8 +6109,6 @@ static int __init regulator_init(void)
ret = class_register(®ulator_class);
debugfs_root = debugfs_create_dir("regulator", NULL);
- if (!debugfs_root)
- pr_warn("regulator: Failed to create debugfs directory\n");
#ifdef CONFIG_DEBUG_FS
debugfs_create_file("supply_map", 0444, debugfs_root, NULL,
--
2.25.1
Powered by blists - more mailing lists