From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Nick <nick@kousu.ca>,
Saket Dumbre <saket.dumbre@intel.com>,
Pawel Chmielewski <pawel.chmielewski@intel.com>,
Mario Limonciello <superm1@kernel.org>
Subject: [PATCH v1 3/3] ACPI: button: Add missing device class clearing on probe failures
Date: Thu, 21 May 2026 15:39:29 +0200 [thread overview]
Message-ID: <3046699.e9J7NaK4W3@rafael.j.wysocki> (raw)
In-Reply-To: <5996185.DvuYhMxLoT@rafael.j.wysocki>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Commit e18947038bf4 ("ACPI: driver: Do not set acpi_device_class()
unnecessarily") modified acpi_button_remove() to clear the device class
field in struct acpi_device on driver removal, but it should also have
updated the rollback path in acpi_button_probe(), which it didn't do,
so do it now.
Fixes: e18947038bf4 ("ACPI: driver: Do not set acpi_device_class() unnecessarily")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/button.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -687,6 +687,7 @@ err_remove_fs:
acpi_button_remove_fs(button);
err_free_button:
kfree(button);
+ memset(acpi_device_class(device), 0, sizeof(acpi_device_class));
return error;
}
next prev parent reply other threads:[~2026-05-21 13:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 13:31 [PATCH v1 0/3] ACPI: button: Fixes related to GPE handling and probe error path Rafael J. Wysocki
2026-05-21 13:32 ` [PATCH v1 1/3] ACPI: button: Fix ACPI GPE handler leak during removal Rafael J. Wysocki
2026-05-21 13:52 ` Mario Limonciello
2026-05-21 13:38 ` [PATCH v1 2/3] ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time Rafael J. Wysocki
2026-05-22 1:48 ` Nick
2026-05-22 12:25 ` Rafael J. Wysocki
2026-05-22 12:26 ` Rafael J. Wysocki
2026-05-21 13:39 ` Rafael J. Wysocki [this message]
2026-05-21 13:53 ` [PATCH v1 3/3] ACPI: button: Add missing device class clearing on probe failures Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3046699.e9J7NaK4W3@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@kousu.ca \
--cc=pawel.chmielewski@intel.com \
--cc=saket.dumbre@intel.com \
--cc=superm1@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox