Skip to contentSkip to conversation

alienware-wmi: Remove unnecessary check at module exit

PATCH Superseded Kurt Borja 1 participant 1 message Nov 19, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kurt Borja

author maintainer
#0 lore raw

PATCH 2/5 alienware-wmi: Remove unnecessary check at module exit

Module initialization fails if platform device fails to register so it's always not NULL at exit.

---
 drivers/platform/x86/dell/alienware-wmi.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/platform/x86/dell/alienware-wmi.c +5 -7
index 742fe79f13dc..289b842c07aa 100644
@@ -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);
Signature · 1 line
2.47.0