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: 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: 03696e51d75a ("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>

authored by

Thomas Fourier and committed by
Ilpo Järvinen
1461209c 05126063

+3
+3
drivers/platform/x86/msi-laptop.c
··· 1130 1130 sysfs_remove_group(&msipf_device->dev.kobj, &msipf_attribute_group); 1131 1131 if (!quirks->old_ec_model && threeg_exists) 1132 1132 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); 1133 1136 platform_device_unregister(msipf_device); 1134 1137 platform_driver_unregister(&msipf_driver); 1135 1138 backlight_device_unregister(msibl_device);