mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
regulator: core: Fix missing error return from regulator_bulk_get()
In commit6eabfc018e
("regulator: core: Allow specifying an initial load w/ the bulk API") I changed the error handling but had a subtle that caused us to always return no error even if there was an error. Fix it. Fixes:6eabfc018e
("regulator: core: Allow specifying an initial load w/ the bulk API") Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20220809142738.1.I91625242f137c707bb345c51c80c5ecee02eeff3@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b0de7fa706
commit
d511e8a7e8
@ -4784,10 +4784,10 @@ int regulator_bulk_get(struct device *dev, int num_consumers,
|
|||||||
consumers[i].consumer = regulator_get(dev,
|
consumers[i].consumer = regulator_get(dev,
|
||||||
consumers[i].supply);
|
consumers[i].supply);
|
||||||
if (IS_ERR(consumers[i].consumer)) {
|
if (IS_ERR(consumers[i].consumer)) {
|
||||||
consumers[i].consumer = NULL;
|
|
||||||
ret = dev_err_probe(dev, PTR_ERR(consumers[i].consumer),
|
ret = dev_err_probe(dev, PTR_ERR(consumers[i].consumer),
|
||||||
"Failed to get supply '%s'",
|
"Failed to get supply '%s'",
|
||||||
consumers[i].supply);
|
consumers[i].supply);
|
||||||
|
consumers[i].consumer = NULL;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user