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:
Andy Shevchenko 2024-02-23 21:49:54 +02:00 committed by Lee Jones
parent f197c75fe0
commit de584f72ce

View File

@ -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);
}