FAILED: patch "[PATCH] platform/x86: dell-laptop: fix missing cleanups in init error" failed to apply to 6.6-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 6e9cab2247e5b243ae2d907ce7c948a8a9c8d61a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072059-eastcoast-eating-4897@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 6e9cab2247e5b243ae2d907ce7c948a8a9c8d61a Mon Sep 17 00:00:00 2001
From: Haoxiang Li <[email protected]>
Date: Tue, 9 Jun 2026 16:14:19 +0800
Subject: [PATCH] platform/x86: dell-laptop: fix missing cleanups in init error
path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
dell_init() initializes several resources after dell_setup_rfkill(), including the optional touchpad LED, keyboard backlight LED, battery hook, debugfs directory and dell-laptop notifier.
If a later LED or backlight registration fails, the error path only tears down the battery hook and rfkill resources. This leaves the notifier, debugfs directory, keyboard backlight LED and optional touchpad LED registered after dell_init() returns an error.
Add the missing cleanup calls before tearing down rfkill.
drivers/platform/x86/dell/dell-laptop.c +5 -0
@@ -2560,7 +2560,12 @@ static int __init dell_init(void)if (mute_led_registered)led_classdev_unregister (&mute_led_cdev); fail_led: +dell_laptop_unregister_notifier (&dell_laptop_notifier); +debugfs_remove_recursive (dell_laptop_dir);dell_battery_exit (); +kbd_led_exit (); +if (quirks && quirks->touchpad_led) +touchpad_led_exit ();dell_cleanup_rfkill (); fail_rfkill:platform_device_del (platform_device);
Sasha Levin
maintainerPATCH 1/2 platform/x86: dell-smbios: Move request functions for reuse
From: Lyndon Sanche <[email protected]>
[ Upstream commit 33245680ae565aaa114d726bf407c8ff38e75e71 ]
Move the dell_send_request and dell_fill_request symbols into smbios-base so that they can be used in multiple modules.
Stable-dep-of: 6e9cab2247e5 ("platform/x86: dell-laptop: fix missing cleanups in init error path")
--- drivers/platform/x86/dell/dell-laptop.c | 23 ------------------ drivers/platform/x86/dell/dell-smbios-base.c | 25 ++++++++++++++++++++ drivers/platform/x86/dell/dell-smbios.h | 5 ++++ 3 files changed, 30 insertions(+), 23 deletions(-)
drivers/platform/x86/dell/dell-laptop.c +0 -23
@@ -353,29 +353,6 @@ static const struct dmi_system_id dell_quirks[] __initconst = { { } }; -static void dell_fill_request (struct calling_interface_buffer *buffer, -u32 arg0,u32 arg1,u32 arg2,u32 arg3) -{ -memset (buffer,0 ,sizeof (struct calling_interface_buffer )); - buffer->input[0 ] = arg0; - buffer->input[1 ] = arg1; - buffer->input[2 ] = arg2; - buffer->input[3 ] = arg3; -} - -static int dell_send_request (struct calling_interface_buffer *buffer, -u16 class,u16 select) -{ -int ret; - - buffer->cmd_class = class; - buffer->cmd_select = select; - ret =dell_smbios_call (buffer); -if (ret !=0 ) -return ret; -return dell_smbios_error (buffer->output[0 ]); -} -/* * Derived from information in smbios-wireless-ctl: *
drivers/platform/x86/dell/dell-smbios-base.c +25 -0
@@ -320,6 +320,31 @@ int dell_smbios_call(struct calling_interface_buffer *buffer) }EXPORT_SYMBOL_GPL (dell_smbios_call); +void dell_fill_request (struct calling_interface_buffer *buffer, +u32 arg0,u32 arg1,u32 arg2,u32 arg3) +{ +memset (buffer,0 ,sizeof (struct calling_interface_buffer )); + buffer->input[0 ] = arg0; + buffer->input[1 ] = arg1; + buffer->input[2 ] = arg2; + buffer->input[3 ] = arg3; +} +EXPORT_SYMBOL_GPL (dell_fill_request); + +int dell_send_request (struct calling_interface_buffer *buffer, +u16 class,u16 select) +{ +int ret; + + buffer->cmd_class = class; + buffer->cmd_select = select; + ret =dell_smbios_call (buffer); +if (ret !=0 ) +return ret; +return dell_smbios_error (buffer->output[0 ]); +} +EXPORT_SYMBOL_GPL (dell_send_request); +struct calling_interface_token *dell_smbios_find_token (int tokenid) {int i;
drivers/platform/x86/dell/dell-smbios.h +5 -0
@@ -64,6 +64,11 @@ int dell_smbios_call_filter(struct device *d, struct calling_interface_buffer *buffer);int dell_smbios_call (struct calling_interface_buffer *buffer); +void dell_fill_request (struct calling_interface_buffer *buffer, +u32 arg0,u32 arg1,u32 arg2,u32 arg3); +int dell_send_request (struct calling_interface_buffer *buffer, +u16 class,u16 select); +struct calling_interface_token *dell_smbios_find_token (int tokenid);enum dell_laptop_notifier_actions {
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/2 platform/x86: dell-laptop: fix missing cleanups in init error path
From: Haoxiang Li <[email protected]>
[ Upstream commit 6e9cab2247e5b243ae2d907ce7c948a8a9c8d61a ]
dell_init() initializes several resources after dell_setup_rfkill(), including the optional touchpad LED, keyboard backlight LED, battery hook, debugfs directory and dell-laptop notifier.
If a later LED or backlight registration fails, the error path only tears down the battery hook and rfkill resources. This leaves the notifier, debugfs directory, keyboard backlight LED and optional touchpad LED registered after dell_init() returns an error.
Add the missing cleanup calls before tearing down rfkill.
--- drivers/platform/x86/dell/dell-laptop.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/platform/x86/dell/dell-laptop.c +5 -0
@@ -2295,6 +2295,11 @@ static int __init dell_init(void)if (mute_led_registered)led_classdev_unregister (&mute_led_cdev); fail_led: +dell_laptop_unregister_notifier (&dell_laptop_notifier); +debugfs_remove_recursive (dell_laptop_dir); +kbd_led_exit (); +if (quirks && quirks->touchpad_led) +touchpad_led_exit ();dell_cleanup_rfkill (); fail_rfkill:platform_device_del (platform_device);
Signature · 1 line
2.53.0
Re: [PATCH 6.6.y 1/2] platform/x86: dell-smbios: Move request functions for reuse
In reply to Sasha LevinQuoted 11 lines · Sasha Levin
From: Lyndon Sanche <[email protected]>
[ Upstream commit
33245680ae565aaa114d726bf407c8ff38e75e71]Move the
dell_send_requestanddell_fill_requestsymbols into smbios-base so that they can be used in multiple modules.Signed-off-by Lyndon Sanche <[email protected]>Reviewed-by Ilpo Järvinen <[email protected]>Signed-off-by Ilpo Järvinen <[email protected]>
Quoted 8 lines
Stable-dep-of:
6e9cab2247e5("platform/x86: dell-laptop: fix missing cleanups in init error path")Signed-off-by Sasha Levin <[email protected]>--- drivers/platform/x86/dell/dell-laptop.c | 23 ------------------ drivers/platform/x86/dell/dell-smbios-base.c | 25 ++++++++++++++++++++ drivers/platform/x86/dell/dell-smbios.h | 5 ++++ 3 files changed, 30 insertions(+), 23 deletions(-)
Reasonable to me. Thanks.