Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@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>

authored by

Kurt Borja and committed by
Ilpo Järvinen
11cba479 e1af6f01

+2 -2
+2 -2
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
··· 1034 1034 release_attributes_data(); 1035 1035 1036 1036 err_destroy_classdev: 1037 - device_destroy(&firmware_attributes_class, MKDEV(0, 0)); 1037 + device_unregister(bioscfg_drv.class_dev); 1038 1038 1039 1039 err_unregister_class: 1040 1040 hp_exit_attr_set_interface(); ··· 1045 1045 static void __exit hp_exit(void) 1046 1046 { 1047 1047 release_attributes_data(); 1048 - device_destroy(&firmware_attributes_class, MKDEV(0, 0)); 1048 + device_unregister(bioscfg_drv.class_dev); 1049 1049 1050 1050 hp_exit_attr_set_interface(); 1051 1051 }