summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJianuo Kuang <u202110722@hust.edu.cn>2023-04-24 04:41:40 +0200
committerJakub Kicinski <kuba@kernel.org>2023-04-25 03:12:42 +0200
commite515c330d7e22692d03475740fa45d179281cdf7 (patch)
treec47bc8510873f2555fd7c94c8553d8e4016c34fa
parentnet: phy: dp83867: Remove unnecessary (void*) conversions (diff)
downloadlinux-e515c330d7e22692d03475740fa45d179281cdf7.tar.xz
linux-e515c330d7e22692d03475740fa45d179281cdf7.zip
drivers: nfc: nfcsim: remove return value check of `dev_dir`
Smatch complains that: nfcsim_debugfs_init_dev() warn: 'dev_dir' 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. Signed-off-by: Jianuo Kuang <u202110722@hust.edu.cn> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230424024140.34607-1-u202110722@hust.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/nfc/nfcsim.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/nfc/nfcsim.c b/drivers/nfc/nfcsim.c
index 85bf8d586c70..44eeb17ae48d 100644
--- a/drivers/nfc/nfcsim.c
+++ b/drivers/nfc/nfcsim.c
@@ -367,11 +367,6 @@ static void nfcsim_debugfs_init_dev(struct nfcsim *dev)
}
dev_dir = debugfs_create_dir(devname, nfcsim_debugfs_root);
- if (!dev_dir) {
- NFCSIM_ERR(dev, "Could not create debugfs entries for nfc%d\n",
- idx);
- return;
- }
debugfs_create_u8("dropframe", 0664, dev_dir, &dev->dropframe);
}