mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
leds: qti-flash: Handle error return path properly
Currently if qti_flash_lmh_mitigation_config() returns an error
in qti_flash_led_strobe(), spin_unlock() is not called in the
error return path. Fix it.
Fixes: 42bdecad7ccd7 ("leds: qti-flash: Fix LMH mitigation configuration")
Change-Id: I1bede93873a151cc9bab7f2000d8f058e1890fda
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
parent
473df1747b
commit
1a6aa7063c
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user