Skip to content

Commit de584f7

Browse files
andy-shevlag-linaro
authored andcommitted
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>
1 parent f197c75 commit de584f7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/mfd/kempld-core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,9 +895,7 @@ static int __init kempld_init(void)
895895

896896
static void __exit kempld_exit(void)
897897
{
898-
if (kempld_pdev)
899-
platform_device_unregister(kempld_pdev);
900-
898+
platform_device_unregister(kempld_pdev);
901899
platform_driver_unregister(&kempld_driver);
902900
}
903901

0 commit comments

Comments
 (0)