[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240223195113.880121-6-andriy.shevchenko@linux.intel.com>
Date: Fri, 23 Feb 2024 21:49:54 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org
Cc: Lee Jones <lee@...nel.org>
Subject: [PATCH v1 5/6] 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@...ux.intel.com>
---
drivers/mfd/kempld-core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index c3bc61dcd098..30b8408c094e 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -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);
}
--
2.43.0.rc1.1.gbec44491f096
Powered by blists - more mailing lists