diff --git a/src/uniwill_keyboard.h b/src/uniwill_keyboard.h index 4bd65ba..6b5dcdc 100644 --- a/src/uniwill_keyboard.h +++ b/src/uniwill_keyboard.h @@ -640,7 +640,8 @@ static int uniwill_keyboard_remove(struct platform_device *dev) { // Restore previous backlight enable state if (uniwill_kbd_bl_enable_state_on_start != 0xff) { - sysfs_remove_group(&dev->dev.kobj, &uw_kbd_bl_color_attr_group); + if (uniwill_kbd_bl_type_rgb_single_color) + sysfs_remove_group(&dev->dev.kobj, &uw_kbd_bl_color_attr_group); uniwill_write_kbd_bl_enable(uniwill_kbd_bl_enable_state_on_start); }