From: Jianuo Kuang Date: Mon, 24 Apr 2023 02:41:40 +0000 (+0800) Subject: drivers: nfc: nfcsim: remove return value check of `dev_dir` X-Git-Tag: v6.6.17~4755^2~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e515c330d7e22692d03475740fa45d179281cdf7;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Dongliang Mu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230424024140.34607-1-u202110722@hust.edu.cn Signed-off-by: Jakub Kicinski --- diff --git a/drivers/nfc/nfcsim.c b/drivers/nfc/nfcsim.c index 85bf8d5..44eeb17 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); }