* [PATCH 2/5] alienware-wmi: Remove unnecessary check at module exit
@ 2024-11-19 4:34 Kurt Borja
0 siblings, 0 replies; only message in thread
From: Kurt Borja @ 2024-11-19 4:34 UTC (permalink / raw)
To: kuurtb
Cc: Dell.Client.Kernel, hdegoede, ilpo.jarvinen, linux-kernel,
mario.limonciello, platform-driver-x86, w_armin
Module initialization fails if platform device fails to register so it's
always not NULL at exit.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
drivers/platform/x86/dell/alienware-wmi.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
index 742fe79f13dc..289b842c07aa 100644
--- a/drivers/platform/x86/dell/alienware-wmi.c
+++ b/drivers/platform/x86/dell/alienware-wmi.c
@@ -1252,13 +1252,11 @@ module_init(alienware_wmi_init);
static void __exit alienware_wmi_exit(void)
{
- if (platform_device) {
- alienware_zone_exit(platform_device);
- remove_hdmi(platform_device);
- remove_thermal_profile();
- platform_device_unregister(platform_device);
- platform_driver_unregister(&platform_driver);
- }
+ alienware_zone_exit(platform_device);
+ remove_hdmi(platform_device);
+ remove_thermal_profile();
+ platform_device_unregister(platform_device);
+ platform_driver_unregister(&platform_driver);
}
module_exit(alienware_wmi_exit);
--
2.47.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-19 4:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 4:34 [PATCH 2/5] alienware-wmi: Remove unnecessary check at module exit Kurt Borja
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.