Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08189eda authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

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: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent b490abfe
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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) &&