diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-04-02 20:43:33 +0300 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2021-04-02 12:53:39 -0500 |
commit | 25f314db2eff4902668a80f4bade321cdc8aa902 (patch) | |
tree | 7fb1414826d73fdcfe46949774d20c16ca95b41a /drivers/char | |
parent | d14ce8c7708766a75fcb0ceca69cabcadfad9e43 (diff) |
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 <andriy.shevchenko@linux.intel.com>
Message-Id: <20210402174334.13466-10-andriy.shevchenko@linux.intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_hotmod.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi/ipmi_si_hotmod.c index 087f5eb1ebc0..a07ef37c0e3f 100644 --- a/drivers/char/ipmi/ipmi_si_hotmod.c +++ b/drivers/char/ipmi/ipmi_si_hotmod.c @@ -223,8 +223,7 @@ static int hotmod_handler(const char *val, const struct kernel_param *kp) if (strcmp(pdev->name, "hotmod-ipmi-si") == 0) platform_device_unregister(pdev); } - if (dev) - put_device(dev); + put_device(dev); } } rv = strlen(val); |