]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: think-lmi: Fix class device unregistration
authorKurt Borja <kuurtb@gmail.com>
Thu, 26 Jun 2025 01:17:36 +0000 (22:17 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 13:57:49 +0000 (15:57 +0200)
commit8ac2cb8d809b29333a418121674d4c30cd2b5f01
treee260f1643a6c0905f388df18c9ad79b3976bae1a
parent846baaa88a2d06be52e9e2d1d55cdd55fd9d4fb8
platform/x86: think-lmi: Fix class device unregistration

[ Upstream commit 5ff1fbb3059730700b4823f43999fc1315984632 ]

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: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms")
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250625-dest-fix-v1-2-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>
drivers/platform/x86/think-lmi.c