Skip to content

Commit

Permalink
regulator: core: Fix missing error return from regulator_bulk_get()
Browse files Browse the repository at this point in the history
In commit 6eabfc0 ("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: 6eabfc0 ("regulator: core: Allow specifying an initial load w/ the bulk API")
Signed-off-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/20220809142738.1.I91625242f137c707bb345c51c80c5ecee02eeff3@changeid
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
dianders authored and broonie committed Aug 10, 2022
1 parent b0de7fa commit d511e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4784,10 +4784,10 @@ int regulator_bulk_get(struct device *dev, int num_consumers,
consumers[i].consumer = regulator_get(dev,
consumers[i].supply);
if (IS_ERR(consumers[i].consumer)) {
consumers[i].consumer = NULL;
ret = dev_err_probe(dev, PTR_ERR(consumers[i].consumer),
"Failed to get supply '%s'",
consumers[i].supply);
consumers[i].consumer = NULL;
goto err;
}

Expand Down

0 comments on commit d511e8a

Please sign in to comment.