projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f197c75
)
mfd: kempld: Drop duplicate NULL check in ->exit()
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Fri, 23 Feb 2024 19:49:54 +0000
(21:49 +0200)
committer
Lee Jones
<lee@kernel.org>
Fri, 10 May 2024 14:39:16 +0000
(15:39 +0100)
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>
drivers/mfd/kempld-core.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/kempld-core.c
b/drivers/mfd/kempld-core.c
index c3bc61dcd098f7e6b81050b34f02a67a2f0bdd77..30b8408c094e8a58b119802b621f54bb45c4b143 100644
(file)
--- 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);
}