Skip to content

Commit

Permalink
magic backlight: use nested if
Browse files Browse the repository at this point in the history
now edited this patch by hand so hopefully it will apply right...
  • Loading branch information
Redecorating committed Jul 2, 2024
1 parent 43ce41c commit 65eb966
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 1017-HID-apple-Add-support-for-magic-keyboard-backlight-o.patch
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ index bd022e004356..2d1cd4456303 100644
if (quirks & APPLE_BACKLIGHT_CTL)
apple_backlight_init(hdev);

+ if (quirks & APPLE_MAGIC_BACKLIGHT)
+ if (quirks & APPLE_MAGIC_BACKLIGHT) {
+ ret = apple_magic_backlight_init(hdev);
+
+ if (ret) {
+ del_timer_sync(&asc->battery_timer);
+ hid_hw_stop(hdev);
+ return ret;
+ if (ret) {
+ del_timer_sync(&asc->battery_timer);
+ hid_hw_stop(hdev);
+ return ret;
+ }
+ }
+
return 0;
Expand Down

0 comments on commit 65eb966

Please sign in to comment.