Skip to content

Commit 1461209

Browse files
Thomas-fourierij-intel
authored andcommitted
platform/x86: msi-laptop: add missing sysfs_remove_group()
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>
1 parent 0512606 commit 1461209

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
@@ -1130,6 +1130,9 @@ static void __exit msi_cleanup(void)
11301130
sysfs_remove_group(&msipf_device->dev.kobj, &msipf_attribute_group);
11311131
if (!quirks->old_ec_model && threeg_exists)
11321132
device_remove_file(&msipf_device->dev, &dev_attr_threeg);
1133+
if (quirks->old_ec_model)
1134+
sysfs_remove_group(&msipf_device->dev.kobj,
1135+
&msipf_old_attribute_group);
11331136
platform_device_unregister(msipf_device);
11341137
platform_driver_unregister(&msipf_driver);
11351138
backlight_device_unregister(msibl_device);

0 commit comments

Comments
 (0)