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>
This commit is contained in:
parent
d14ce8c770
commit
25f314db2e
1 changed files with 1 additions and 2 deletions
|
@ -223,8 +223,7 @@ static int hotmod_handler(const char *val, const struct kernel_param *kp)
|
||||||
if (strcmp(pdev->name, "hotmod-ipmi-si") == 0)
|
if (strcmp(pdev->name, "hotmod-ipmi-si") == 0)
|
||||||
platform_device_unregister(pdev);
|
platform_device_unregister(pdev);
|
||||||
}
|
}
|
||||||
if (dev)
|
put_device(dev);
|
||||||
put_device(dev);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rv = strlen(val);
|
rv = strlen(val);
|
||||||
|
|
Loading…
Add table
Reference in a new issue