[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250105153019.19206-3-kuurtb@gmail.com>
Date: Sun, 5 Jan 2025 10:30:01 -0500
From: Kurt Borja <kuurtb@...il.com>
To: platform-driver-x86@...r.kernel.org
Cc: ilpo.jarvinen@...ux.intel.com,
w_armin@....de,
mario.limonciello@....com,
hdegoede@...hat.com,
Dell.Client.Kernel@...l.com,
linux-kernel@...r.kernel.org,
Kurt Borja <kuurtb@...il.com>,
Armin Wolf <W_Armin@....de>
Subject: [PATCH v3 01/20] platform/x86: 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.
Reviewed-by: Armin Wolf <W_Armin@....de>
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
Signed-off-by: Kurt Borja <kuurtb@...il.com>
---
drivers/platform/x86/dell/alienware-wmi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
index 7b3ee2d6a23d..7212d75396b9 100644
--- a/drivers/platform/x86/dell/alienware-wmi.c
+++ b/drivers/platform/x86/dell/alienware-wmi.c
@@ -1250,12 +1250,10 @@ module_init(alienware_wmi_init);
static void __exit alienware_wmi_exit(void)
{
- if (platform_device) {
- alienware_zone_exit(platform_device);
- remove_hdmi(platform_device);
- platform_device_unregister(platform_device);
- platform_driver_unregister(&platform_driver);
- }
+ alienware_zone_exit(platform_device);
+ remove_hdmi(platform_device);
+ platform_device_unregister(platform_device);
+ platform_driver_unregister(&platform_driver);
}
module_exit(alienware_wmi_exit);
--
2.47.1
Powered by blists - more mailing lists