mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 13:22:02 +02:00
leds: qti-flash: Fix early return in qti_flash_led_disable()
When attempting to disable a flash node that is not configured, return gracefully as it is not an error condition. Change-Id: I3cf82eddc4ac078384a5278bd2832f7adceba853 Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
This commit is contained in:
parent
e1d79e321d
commit
4404a1a342
|
|
@ -456,8 +456,10 @@ static int qti_flash_led_disable(struct flash_node_data *fnode)
|
|||
struct qti_flash_led *led = fnode->led;
|
||||
int rc;
|
||||
|
||||
if (!fnode->configured)
|
||||
return -EINVAL;
|
||||
if (!fnode->configured) {
|
||||
pr_debug("%s is not configured\n", fnode->fdev.led_cdev.name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
spin_lock(&led->lock);
|
||||
if ((fnode->strobe_sel == HW_STROBE) &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user