提交 bd390d2c 编写于 作者: C Claudiu Beznea 提交者: Zheng Zengkai

regulator: core: do not continue if selector match

mainline inclusion
from mainline-v5.11-rc1
commit ab97800e
category: bugfix
bugzilla: 185694 https://gitee.com/openeuler/kernel/issues/I4DDEL

Do not continue if selector has already been located.
Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/1605290164-11556-1-git-send-email-claudiu.beznea@microchip.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NGuan Jing <guanjing6@huawei.com>
Reviewed-by: NChen Hui <judy.chenhui@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d54fcc95
......@@ -4058,6 +4058,10 @@ int regulator_set_voltage_time(struct regulator *regulator,
for (i = 0; i < rdev->desc->n_voltages; i++) {
/* We only look for exact voltage matches here */
if (old_sel >= 0 && new_sel >= 0)
break;
voltage = regulator_list_voltage(regulator, i);
if (voltage < 0)
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册