From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA61742DFEC; Tue, 21 Jul 2026 19:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784663963; cv=none; b=Dri1GqVkBftt1AlpfUxPIdmmcAXLdQu6/QtSj5A/tMht/i/Lk8pql9mUuhFaWnzm9um3DXyCr/Gbo96tbDt5tJCs30pndR/47i0RdDvQLRiu/wdKmdKp8Brp3sSMoeFfneM51uGJVmVVDPjZ7c1UPAaVrjOFtaDHTqc0GwGeYXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784663963; c=relaxed/simple; bh=0ngPal4P/cNAtT5YaSyHUkBYNN1iW9s7n2dDYja9ARo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SUcrwqZ5rsuYWHQYUd88cc+LVBrGS0WcQ5BMmG0q99lKKWQLRfG3RyFyeGYzQrfa/TFNVOVodRZkp0rQiCKTy4tebI//GrNo1InZh0mjUh7LTUsUy4fqpH+e7uXH6mAqRgOSnKahQv11bui+ILH+cY3NFRLMim72fRKbpXJjCRQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0iLH6834; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0iLH6834" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6E021F000E9; Tue, 21 Jul 2026 19:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784663959; bh=xKhuyaHNco9+t61s8vi3Cqas0QM/g1WaW3NQvWuGE5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0iLH6834q8E5FktdpoyG2jU9ntm8lzz1Q0Yg1ZFtzLMXpPsczstp1fjDX45nYIhTi QaT/LX/nKcijNuFJ4+SuHMX5ew0lrPJaOwItiN1RT6A741ar8ejEPlKK++8Ikh3KGj B1P32xOGWbUbCtO9DkzKDayEGgKkPfJ3ezHGril0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Haoxiang Li , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 6.12 0967/1276] platform/x86: dell-laptop: fix missing cleanups in init error path Date: Tue, 21 Jul 2026 17:23:30 +0200 Message-ID: <20260721152507.664042337@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Haoxiang Li commit 6e9cab2247e5b243ae2d907ce7c948a8a9c8d61a upstream. 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. Fixes: 9c656b07997f ("platform/x86: dell-*: Call new led hw_changed API on kbd brightness change") Fixes: 037accfa14b2 ("dell-laptop: Add debugfs support") Fixes: 2d8b90be4f1c ("dell-laptop: support Synaptics/Alps touchpad led") Fixes: 6cff8d60aa0a ("platform: x86: dell-laptop: Add support for keyboard backlight") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Link: https://patch.msgid.link/20260609081419.1995169-1-lihaoxiang@isrc.iscas.ac.cn Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/dell/dell-laptop.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/platform/x86/dell/dell-laptop.c +++ b/drivers/platform/x86/dell/dell-laptop.c @@ -2555,7 +2555,12 @@ fail_backlight: 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);