summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorKurt Borja <kuurtb@gmail.com>2025-06-26 04:17:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-10 17:03:17 +0300
commita6069306f4e18b9a0bb4d778726a451ea96dbff2 (patch)
tree57b75b6f6d4feb57b205cee7e28122e4d4a330ed /drivers/platform
parent8570c219cd59d01c109ff798f6a8d57c28c222d8 (diff)
downloadlinux-a6069306f4e18b9a0bb4d778726a451ea96dbff2.tar.xz
platform/x86: hp-bioscfg: Fix class device unregistration
[ Upstream commit 11cba4793b95df3bc192149a6eb044f69aa0b99e ] 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@gmail.com> Link: https://lore.kernel.org/r/20250625-dest-fix-v1-1-3a0f342312bb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/hp/hp-bioscfg/bioscfg.c4
1 files 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 049851e469f6..b62b158cffd8 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
@@ -1039,7 +1039,7 @@ err_release_attributes_data:
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();
@@ -1050,7 +1050,7 @@ err_unregister_class:
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();
}