]> Git Repo - linux.git/commitdiff
platform/chrome: wilco_ec: remove return value check of debugfs_create_dir()
authorZhengkang Huang <[email protected]>
Wed, 19 Apr 2023 10:03:03 +0000 (18:03 +0800)
committerTzung-Bi Shih <[email protected]>
Mon, 24 Apr 2023 05:35:12 +0000 (13:35 +0800)
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 <[email protected]>
Reviewed-by: Dongliang Mu <[email protected]>
Signed-off-by: Tzung-Bi Shih <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
drivers/platform/chrome/wilco_ec/debugfs.c

index a812788a0bdcc2402d012fab056f3851dbc3373b..7a13f13b16cd2fe830d80894350d71011757a76b 100644 (file)
@@ -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);
This page took 0.058989 seconds and 4 git commands to generate.