Skip to content

Commit 11cba47

Browse files
kuu-rtij-intel
authored andcommitted
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: a34fc32 ("platform/x86: hp-bioscfg: bioscfg") Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent e1af6f0 commit 11cba47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/hp/hp-bioscfg/bioscfg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ static int __init hp_init(void)
10341034
release_attributes_data();
10351035

10361036
err_destroy_classdev:
1037-
device_destroy(&firmware_attributes_class, MKDEV(0, 0));
1037+
device_unregister(bioscfg_drv.class_dev);
10381038

10391039
err_unregister_class:
10401040
hp_exit_attr_set_interface();
@@ -1045,7 +1045,7 @@ static int __init hp_init(void)
10451045
static void __exit hp_exit(void)
10461046
{
10471047
release_attributes_data();
1048-
device_destroy(&firmware_attributes_class, MKDEV(0, 0));
1048+
device_unregister(bioscfg_drv.class_dev);
10491049

10501050
hp_exit_attr_set_interface();
10511051
}

0 commit comments

Comments
 (0)