Skip to content

Commit 25f314d

Browse files
andy-shevcminyard
authored andcommitted
ipmi_si: Drop redundant check before calling put_device()
put_device() is NULL aware, drop redundant check before calling it. Signed-off-by: Andy Shevchenko <[email protected]> Message-Id: <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
1 parent d14ce8c commit 25f314d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/char/ipmi/ipmi_si_hotmod.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ static int hotmod_handler(const char *val, const struct kernel_param *kp)
223223
if (strcmp(pdev->name, "hotmod-ipmi-si") == 0)
224224
platform_device_unregister(pdev);
225225
}
226-
if (dev)
227-
put_device(dev);
226+
put_device(dev);
228227
}
229228
}
230229
rv = strlen(val);

0 commit comments

Comments
 (0)