mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Merge "leds: qti-flash: Fix error logging in qti_flash_led_symmetry_config()"
This commit is contained in:
commit
be08d2a05d
1 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue