[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250625-dest-fix-v1-1-3a0f342312bb@gmail.com>
Date: Wed, 25 Jun 2025 22:17:35 -0300
From: Kurt Borja <kuurtb@...il.com>
To: Jorge Lopez <jorge.lopez2@...com>, Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Thomas Weißschuh <linux@...ssschuh.net>,
Mark Pearson <mpearson-lenovo@...ebb.ca>,
Prasanth Ksr <prasanth.ksr@...l.com>,
Mario Limonciello <mario.limonciello@....com>,
Divya Bharathi <divya.bharathi@...l.com>
Cc: platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
Dell.Client.Kernel@...l.com, Kurt Borja <kuurtb@...il.com>
Subject: [PATCH 1/3] platform/x86: hp-bioscfg: Fix class device
unregistration
Devices under the firmware_attributes_class do not have unique a dev_t.
Therefore, device_unregister() should be used instead of
device_destroy(), since the latter may match any device with a given
dev_t.
Fixes: a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg")
Signed-off-by: Kurt Borja <kuurtb@...il.com>
---
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
index 13237890fc92002e7e730b1c235ddf068a6737cd..5bfa7159f5bcd57385a20fe9ac646597b320a378 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
@@ -1034,7 +1034,7 @@ static int __init hp_init(void)
release_attributes_data();
err_destroy_classdev:
- device_destroy(&firmware_attributes_class, MKDEV(0, 0));
+ device_unregister(bioscfg_drv.class_dev);
err_unregister_class:
hp_exit_attr_set_interface();
@@ -1045,7 +1045,7 @@ static int __init hp_init(void)
static void __exit hp_exit(void)
{
release_attributes_data();
- device_destroy(&firmware_attributes_class, MKDEV(0, 0));
+ device_unregister(bioscfg_drv.class_dev);
hp_exit_attr_set_interface();
}
--
2.50.0
Powered by blists - more mailing lists