[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230424024140.34607-1-u202110722@hust.edu.cn>
Date: Mon, 24 Apr 2023 10:41:40 +0800
From: Jianuo Kuang <u202110722@...t.edu.cn>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Thierry Escande <thierry.escande@...labora.com>,
Samuel Ortiz <sameo@...ux.intel.com>
Cc: hust-os-kernel-patches@...glegroups.com,
Jianuo Kuang <u202110722@...t.edu.cn>,
Dongliang Mu <dzm91@...t.edu.cn>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Fixes: f9ac6273e5b8 ("NFC: nfcsim: Add support for sysfs control entry")
Signed-off-by: Jianuo Kuang <u202110722@...t.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@...t.edu.cn>
---
drivers/nfc/nfcsim.c | 5 -----
1 file changed, 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);
}
--
2.25.1
Powered by blists - more mailing lists