diff options
author | 2024-09-03 22:38:12 +0800 | |
---|---|---|
committer | 2024-09-05 15:09:47 +0200 | |
commit | 92f4368347a2a8a204b0513df32233075cd93b4f (patch) | |
tree | 6ea889dfbaf809c99d34746f61d63f74d82bfd03 | |
parent | Merge tag 'renesas-pinctrl-for-v6.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel (diff) | |
download | wireguard-linux-92f4368347a2a8a204b0513df32233075cd93b4f.tar.xz wireguard-linux-92f4368347a2a8a204b0513df32233075cd93b4f.zip |
pinctrl: Remove redundant null pointer checks in pinctrl_remove_device_debugfs()
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>
-rw-r--r-- | drivers/pinctrl/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 314ab93d7691..4061890a1748 100644 --- 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; |