Skip to content

Commit 45a1bb8

Browse files
Thomas-fourierUlrich Hecht
authored andcommitted
platform/x86: msi-laptop: add missing sysfs_remove_group()
[ Upstream commit 1461209cf813b6ee6d40f29b96b544587df6d2b1 ] A sysfs group is created in msi_init() when old_ec_model is enabled, but never removed. Remove the msipf_old_attribute_group in that case. Fixes: 03696e5 ("msi-laptop: Disable brightness control for new EC") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Link: https://patch.msgid.link/20251217103617.27668-2-fourier.thomas@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> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 064b93d commit 45a1bb8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/platform/x86/msi-laptop.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,9 @@ static void __exit msi_cleanup(void)
11591159
sysfs_remove_group(&msipf_device->dev.kobj, &msipf_attribute_group);
11601160
if (!quirks->old_ec_model && threeg_exists)
11611161
device_remove_file(&msipf_device->dev, &dev_attr_threeg);
1162+
if (quirks->old_ec_model)
1163+
sysfs_remove_group(&msipf_device->dev.kobj,
1164+
&msipf_old_attribute_group);
11621165
platform_device_unregister(msipf_device);
11631166
platform_driver_unregister(&msipf_driver);
11641167
backlight_device_unregister(msibl_device);

0 commit comments

Comments
 (0)