Skip to content

Commit d184d60

Browse files
Zhengkang HuangTzung-Bi Shih
authored andcommitted
platform/chrome: wilco_ec: remove return value check of debugfs_create_dir()
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> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20230419100303.343379-1-zkhuang@hust.edu.cn
1 parent 1f3744b commit d184d60

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/platform/chrome/wilco_ec/debugfs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ static int wilco_ec_debugfs_probe(struct platform_device *pdev)
251251
return 0;
252252
debug_info->ec = ec;
253253
debug_info->dir = debugfs_create_dir("wilco_ec", NULL);
254-
if (!debug_info->dir)
255-
return 0;
256254
debugfs_create_file("raw", 0644, debug_info->dir, NULL, &fops_raw);
257255
debugfs_create_file("h1_gpio", 0444, debug_info->dir, ec,
258256
&fops_h1_gpio);

0 commit comments

Comments
 (0)