Unverified Commit 1461209c authored by Thomas Fourier's avatar Thomas Fourier Committed by Ilpo Järvinen
Browse files

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: 03696e51 ("msi-laptop: Disable brightness control for new EC")
Signed-off-by: default avatarThomas Fourier <fourier.thomas@gmail.com>
Link: https://patch.msgid.link/20251217103617.27668-2-fourier.thomas@gmail.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 05126063
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1130,6 +1130,9 @@ static void __exit msi_cleanup(void)
	sysfs_remove_group(&msipf_device->dev.kobj, &msipf_attribute_group);
	if (!quirks->old_ec_model && threeg_exists)
		device_remove_file(&msipf_device->dev, &dev_attr_threeg);
	if (quirks->old_ec_model)
		sysfs_remove_group(&msipf_device->dev.kobj,
				   &msipf_old_attribute_group);
	platform_device_unregister(msipf_device);
	platform_driver_unregister(&msipf_driver);
	backlight_device_unregister(msibl_device);