Skip to content

Commit 4747e89

Browse files
kuu-rtgregkh
authored andcommitted
platform/x86: dell-wmi-sysman: Fix class device unregistration
[ Upstream commit 314e5ad4782d08858b3abc325c0487bd2abc23a1 ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 50472dc commit 4747e89

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
@@ -605,7 +605,7 @@ static int __init sysman_init(void)
605605
release_attributes_data();
606606

607607
err_destroy_classdev:
608-
device_destroy(fw_attr_class, MKDEV(0, 0));
608+
device_unregister(wmi_priv.class_dev);
609609

610610
err_unregister_class:
611611
fw_attributes_class_put();
@@ -622,7 +622,7 @@ static int __init sysman_init(void)
622622
static void __exit sysman_exit(void)
623623
{
624624
release_attributes_data();
625-
device_destroy(fw_attr_class, MKDEV(0, 0));
625+
device_unregister(wmi_priv.class_dev);
626626
fw_attributes_class_put();
627627
exit_bios_attr_set_interface();
628628
exit_bios_attr_pass_interface();

0 commit comments

Comments
 (0)