projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbf0e9d
)
pinctrl: Remove redundant null pointer checks in pinctrl_remove_device_debugfs()
author
Li Zetao
<lizetao1@huawei.com>
Tue, 3 Sep 2024 14:38:12 +0000
(22:38 +0800)
committer
Linus Walleij
<linus.walleij@linaro.org>
Thu, 5 Sep 2024 13:09:47 +0000
(15:09 +0200)
Since the debugfs_create_dir() never returns a null pointer, checking
the return value for a null pointer is redundant, and using IS_ERR is
safe enough.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link:
https://lore.kernel.org/20240903143812.2005071-1-lizetao1@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/core.c
b/drivers/pinctrl/core.c
index
314ab93
..
4061890
100644
(file)
--- a/
drivers/pinctrl/core.c
+++ b/
drivers/pinctrl/core.c
@@
-1971,7
+1971,7
@@
static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)
static void pinctrl_init_debugfs(void)
{
debugfs_root = debugfs_create_dir("pinctrl", NULL);
- if (IS_ERR(debugfs_root)
|| !debugfs_root
) {
+ if (IS_ERR(debugfs_root)) {
pr_warn("failed to create debugfs directory\n");
debugfs_root = NULL;
return;