mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 13:08:30 +04:00
mediatek: leds-smartrg: propagate i2c errors from blink_set
srg_led_set_pulse() returns !cbyte regardless of whether the i2c writes succeeded, reporting successful pattern offload for a failed bus transaction. Return the i2c error instead; a non-zero return makes the LED core fall back to software blinking, which recovers the pattern once the bus is healthy again. Signed-off-by: Chad Monroe <chad@monroe.io> Link: https://github.com/openwrt/openwrt/pull/24354 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
1 parent
6c5a044f14
commit
dbbbf75ef4
1 file changed
+4
-1
@@ -89,7 +89,10 @@ srg_led_set_pulse(struct led_classdev *led_cdev,
|
||||
}
|
||||
mutex_unlock(&sysled_ctrl->lock);
|
||||
|
||||
return !cbyte;
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return cbyte ? 0 : 1;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in new issue
Block a user