Merge "leds: qti-flash: Handle error return path properly"

This commit is contained in:
qctecmdr 2020-08-17 03:53:41 -07:00 • committed by Gerrit - the friendly Code Review server
commit 9fa4e103d2

View file

@ -362,7 +362,7 @@ static int qti_flash_led_strobe(struct qti_flash_led *led,
if (led->trigger_lmh) {
rc = qti_flash_lmh_mitigation_config(led, true);
if (rc < 0)
return rc;
goto error;
/* Wait for LMH mitigation to take effect */
udelay(500);
@ -386,7 +386,7 @@ static int qti_flash_led_strobe(struct qti_flash_led *led,
if (led->trigger_lmh) {
rc = qti_flash_lmh_mitigation_config(led, false);
if (rc < 0)
return rc;
goto error;
led->trigger_lmh = false;
}