[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f4ee416-8ca3-4051-afb2-13266595c3c2@gmx.de>
Date: Fri, 27 Dec 2024 01:32:07 +0100
From: Armin Wolf <W_Armin@....de>
To: Kurt Borja <kuurtb@...il.com>, platform-driver-x86@...r.kernel.org
Cc: ilpo.jarvinen@...ux.intel.com, mario.limonciello@....com,
hdegoede@...hat.com, linux-kernel@...r.kernel.org,
Dell.Client.Kernel@...l.com
Subject: Re: [PATCH 01/20] alienware-wmi: Remove unnecessary check at module
exit
Am 21.12.24 um 06:58 schrieb Kurt Borja:
> 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 | 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 e95d22c7b60c..ed66720260ab 100644
> --- a/drivers/platform/x86/dell/alienware-wmi.c
> +++ b/drivers/platform/x86/dell/alienware-wmi.c
> @@ -1257,13 +1257,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);
Powered by blists - more mailing lists