Skip to content

Commit 92f4368

Browse files
Li Zetaolinusw
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent dbf0e9d commit 92f4368

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pinctrl/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)
19711971
static void pinctrl_init_debugfs(void)
19721972
{
19731973
debugfs_root = debugfs_create_dir("pinctrl", NULL);
1974-
if (IS_ERR(debugfs_root) || !debugfs_root) {
1974+
if (IS_ERR(debugfs_root)) {
19751975
pr_warn("failed to create debugfs directory\n");
19761976
debugfs_root = NULL;
19771977
return;

0 commit comments

Comments
 (0)