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

Commit be08d2a0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "leds: qti-flash: Fix error logging in qti_flash_led_symmetry_config()"

parents 75ffc40f 27ca1ceb
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -569,14 +569,14 @@ static int qti_flash_led_symmetry_config(struct flash_switch_data *snode)
		}
	}

	if (symmetric_leds > 0 && total_curr_ma > 0) {
		per_led_curr_ma = total_curr_ma / symmetric_leds;
	} else {
		pr_err("Incorrect configuration, symmetric_leds: %d total_curr_ma: %d\n",
	if (!symmetric_leds || !total_curr_ma) {
		pr_debug("Incorrect configuration, symmetric_leds: %d total_curr_ma: %d\n",
			symmetric_leds, total_curr_ma);
		return -EINVAL;
		return 0;
	}

	per_led_curr_ma = total_curr_ma / symmetric_leds;

	if (per_led_curr_ma == 0) {
		pr_warn("per_led_curr_ma cannot be 0\n");
		return 0;