diff options
| author | Kurt Borja <kuurtb@gmail.com> | 2025-07-07 15:14:51 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-10 15:57:49 +0200 |
| commit | d8ccb3d081593ef7df4e24824a0892b1a80b6d88 (patch) | |
| tree | fc124f00e2fe050331d79c4f12ac159c59f7d19c | |
| parent | 8ac2cb8d809b29333a418121674d4c30cd2b5f01 (diff) | |
| download | linux-d8ccb3d081593ef7df4e24824a0892b1a80b6d88.tar.gz linux-d8ccb3d081593ef7df4e24824a0892b1a80b6d88.tar.bz2 linux-d8ccb3d081593ef7df4e24824a0892b1a80b6d88.zip | |
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c index ab639dc8a807..ddde6e41d8f3 100644 --- a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +++ b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c @@ -605,7 +605,7 @@ err_release_attributes_data: release_attributes_data(); err_destroy_classdev: - device_destroy(fw_attr_class, MKDEV(0, 0)); + device_unregister(wmi_priv.class_dev); err_unregister_class: fw_attributes_class_put(); @@ -622,7 +622,7 @@ err_exit_bios_attr_set_interface: static void __exit sysman_exit(void) { release_attributes_data(); - device_destroy(fw_attr_class, MKDEV(0, 0)); + device_unregister(wmi_priv.class_dev); fw_attributes_class_put(); exit_bios_attr_set_interface(); exit_bios_attr_pass_interface(); |
