Commit ab97800e authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Mark Brown

regulator: core: do not continue if selector match

Do not continue if selector has already been located.
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/1605290164-11556-1-git-send-email-claudiu.beznea@microchip.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2f595d08
......@@ -4037,6 +4037,9 @@ int regulator_set_voltage_time(struct regulator *regulator,
if (i < rdev->desc->linear_min_sel)
continue;
if (old_sel >= 0 && new_sel >= 0)
break;
voltage = regulator_list_voltage(regulator, i);
if (voltage < 0)
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment