diff options
author | Zhengkang Huang <zkhuang@hust.edu.cn> | 2023-04-19 18:03:03 +0800 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2023-04-24 13:35:12 +0800 |
commit | d184d60aa301e424cd0cf7de90b40744710a2417 (patch) | |
tree | 99442ea05246000ba1a1ce2974deb493413feffd /drivers/platform/chrome | |
parent | 1f3744b89164a430865d18b757b86c4007627855 (diff) | |
download | lwn-d184d60aa301e424cd0cf7de90b40744710a2417.tar.gz lwn-d184d60aa301e424cd0cf7de90b40744710a2417.zip |
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
Diffstat (limited to 'drivers/platform/chrome')
-rw-r--r-- | drivers/platform/chrome/wilco_ec/debugfs.c | 2 |
1 files changed, 0 insertions, 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); |