Skip to content

Commit 314e5ad

Browse files
kuu-rtij-intel
authored andcommitted
platform/x86: dell-wmi-sysman: 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: e8a60aa ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") 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 5ff1fbb commit 314e5ad

File tree

1 file changed

+2
-2
lines changed
  • drivers/platform/x86/dell/dell-wmi-sysman

1 file changed

+2
-2
lines changed

drivers/platform/x86/dell/dell-wmi-sysman/sysman.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ static int __init sysman_init(void)
597597
release_attributes_data();
598598

599599
err_destroy_classdev:
600-
device_destroy(&firmware_attributes_class, MKDEV(0, 0));
600+
device_unregister(wmi_priv.class_dev);
601601

602602
err_exit_bios_attr_pass_interface:
603603
exit_bios_attr_pass_interface();
@@ -611,7 +611,7 @@ static int __init sysman_init(void)
611611
static void __exit sysman_exit(void)
612612
{
613613
release_attributes_data();
614-
device_destroy(&firmware_attributes_class, MKDEV(0, 0));
614+
device_unregister(wmi_priv.class_dev);
615615
exit_bios_attr_set_interface();
616616
exit_bios_attr_pass_interface();
617617
}

0 commit comments

Comments
 (0)