* [PATCH] platform: chrome: wilco_ec: remove return value check of debugfs_create_dir()
@ 2023-04-19 10:03 Zhengkang Huang
2023-04-20 1:50 ` patchwork-bot+chrome-platform
2023-04-20 4:10 ` patchwork-bot+chrome-platform
0 siblings, 2 replies; 3+ messages in thread
From: Zhengkang Huang @ 2023-04-19 10:03 UTC (permalink / raw)
To: Benson Leung; +Cc: Zhengkang Huang, Dongliang Mu, chrome-platform, linux-kernel
Smatch complains that:
wilco_ec_debugfs_probe() warn: 'debug_info->dir' is an error
pointer or valid
Debugfs checks are generally not supposed to be checked
for errors and it is not necessary here.
Just delete the dead code.
Signed-off-by: Zhengkang Huang <zkhuang@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
---
NOTES: The issue is found by static analysis and remains untested.
---
drivers/platform/chrome/wilco_ec/debugfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c b/drivers/platform/chrome/wilco_ec/debugfs.c
index a812788a0bdc..7a13f13b16cd 100644
--- a/drivers/platform/chrome/wilco_ec/debugfs.c
+++ b/drivers/platform/chrome/wilco_ec/debugfs.c
@@ -251,8 +251,6 @@ static int wilco_ec_debugfs_probe(struct platform_device *pdev)
return 0;
debug_info->ec = ec;
debug_info->dir = debugfs_create_dir("wilco_ec", NULL);
- if (!debug_info->dir)
- return 0;
debugfs_create_file("raw", 0644, debug_info->dir, NULL, &fops_raw);
debugfs_create_file("h1_gpio", 0444, debug_info->dir, ec,
&fops_h1_gpio);
--
2.40.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform: chrome: wilco_ec: remove return value check of debugfs_create_dir()
2023-04-19 10:03 [PATCH] platform: chrome: wilco_ec: remove return value check of debugfs_create_dir() Zhengkang Huang
@ 2023-04-20 1:50 ` patchwork-bot+chrome-platform
2023-04-20 4:10 ` patchwork-bot+chrome-platform
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-04-20 1:50 UTC (permalink / raw)
To: Zhengkang Huang; +Cc: bleung, dzm91, chrome-platform, linux-kernel
Hello:
This patch was applied to chrome-platform/linux.git (for-kernelci)
by Tzung-Bi Shih <tzungbi@kernel.org>:
On Wed, 19 Apr 2023 18:03:03 +0800 you wrote:
> Smatch complains that:
> wilco_ec_debugfs_probe() warn: 'debug_info->dir' is an error
> pointer or valid
>
> Debugfs checks are generally not supposed to be checked
> for errors and it is not necessary here.
>
> [...]
Here is the summary with links:
- platform: chrome: wilco_ec: remove return value check of debugfs_create_dir()
https://git.kernel.org/chrome-platform/c/0ad5ce8407db
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform: chrome: wilco_ec: remove return value check of debugfs_create_dir()
2023-04-19 10:03 [PATCH] platform: chrome: wilco_ec: remove return value check of debugfs_create_dir() Zhengkang Huang
2023-04-20 1:50 ` patchwork-bot+chrome-platform
@ 2023-04-20 4:10 ` patchwork-bot+chrome-platform
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-04-20 4:10 UTC (permalink / raw)
To: Zhengkang Huang; +Cc: bleung, dzm91, chrome-platform, linux-kernel
Hello:
This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:
On Wed, 19 Apr 2023 18:03:03 +0800 you wrote:
> Smatch complains that:
> wilco_ec_debugfs_probe() warn: 'debug_info->dir' is an error
> pointer or valid
>
> Debugfs checks are generally not supposed to be checked
> for errors and it is not necessary here.
>
> [...]
Here is the summary with links:
- platform: chrome: wilco_ec: remove return value check of debugfs_create_dir()
https://git.kernel.org/chrome-platform/c/0ad5ce8407db
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-20 4:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-19 10:03 [PATCH] platform: chrome: wilco_ec: remove return value check of debugfs_create_dir() Zhengkang Huang
2023-04-20 1:50 ` patchwork-bot+chrome-platform
2023-04-20 4:10 ` patchwork-bot+chrome-platform
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).