regulator: core: do not continue if selector match
Do not continue if selector has already been located. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/1605290164-11556-1-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2f595d0861
commit
ab97800e08
|
@ -4037,6 +4037,9 @@ int regulator_set_voltage_time(struct regulator *regulator,
|
||||||
if (i < rdev->desc->linear_min_sel)
|
if (i < rdev->desc->linear_min_sel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (old_sel >= 0 && new_sel >= 0)
|
||||||
|
break;
|
||||||
|
|
||||||
voltage = regulator_list_voltage(regulator, i);
|
voltage = regulator_list_voltage(regulator, i);
|
||||||
if (voltage < 0)
|
if (voltage < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue