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: 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: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems")
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250625-dest-fix-v1-3-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
314e5ad4 5ff1fbb3

+2 -2
+2 -2
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
··· 597 597 release_attributes_data(); 598 598 599 599 err_destroy_classdev: 600 - device_destroy(&firmware_attributes_class, MKDEV(0, 0)); 600 + device_unregister(wmi_priv.class_dev); 601 601 602 602 err_exit_bios_attr_pass_interface: 603 603 exit_bios_attr_pass_interface(); ··· 611 611 static void __exit sysman_exit(void) 612 612 { 613 613 release_attributes_data(); 614 - device_destroy(&firmware_attributes_class, MKDEV(0, 0)); 614 + device_unregister(wmi_priv.class_dev); 615 615 exit_bios_attr_set_interface(); 616 616 exit_bios_attr_pass_interface(); 617 617 }