mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-03 12:05:13 +02:00
platform/x86: hp-bioscfg: Fix class device unregistration
[ Upstream commit11cba4793b] 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:a34fc329b1("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0386a68f95
commit
1958bccfa4
@@ -1037,7 +1037,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();
|
||||
@@ -1048,7 +1048,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user