mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
mfd: kempld: Drop duplicate NULL check in ->exit()
Since platform_device_unregister() is NULL-aware, we don't need to duplicate this check. Remove it and fold the rest of the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240223195113.880121-6-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
f197c75fe0
commit
de584f72ce
|
|
@ -895,9 +895,7 @@ static int __init kempld_init(void)
|
|||
|
||||
static void __exit kempld_exit(void)
|
||||
{
|
||||
if (kempld_pdev)
|
||||
platform_device_unregister(kempld_pdev);
|
||||
|
||||
platform_device_unregister(kempld_pdev);
|
||||
platform_driver_unregister(&kempld_driver);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user