[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241120164411.7471-1-kuurtb@gmail.com>
Date: Wed, 20 Nov 2024 13:44:11 -0300
From: Kurt Borja <kuurtb@...il.com>
To: kuurtb@...il.com
Cc: Dell.Client.Kernel@...l.com,
hdegoede@...hat.com,
ilpo.jarvinen@...ux.intel.com,
linux-kernel@...r.kernel.org,
mario.limonciello@....com,
platform-driver-x86@...r.kernel.org,
w_armin@....de
Subject: [PATCH v2 4/4] 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.
Signed-off-by: Kurt Borja <kuurtb@...il.com>
---
v2:
- Unchanged
---
drivers/platform/x86/dell/alienware-wmi.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
index 512f6b22585c..5e0acaf35952 100644
--- a/drivers/platform/x86/dell/alienware-wmi.c
+++ b/drivers/platform/x86/dell/alienware-wmi.c
@@ -1197,11 +1197,9 @@ module_init(alienware_wmi_init);
static void __exit alienware_wmi_exit(void)
{
- if (platform_device) {
- remove_thermal_profile();
- platform_device_unregister(platform_device);
- platform_driver_unregister(&platform_driver);
- }
+ remove_thermal_profile();
+ platform_device_unregister(platform_device);
+ platform_driver_unregister(&platform_driver);
}
module_exit(alienware_wmi_exit);
--
2.47.0
Powered by blists - more mailing lists