Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: core: Fix missing error return from regulator_bulk_get()

In commit 6eabfc018e8d ("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: 6eabfc018e8d ("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>

authored by

Douglas Anderson and committed by
Mark Brown
d511e8a7 b0de7fa7

+1 -1
+1 -1
drivers/regulator/core.c
··· 4784 4784 consumers[i].consumer = regulator_get(dev, 4785 4785 consumers[i].supply); 4786 4786 if (IS_ERR(consumers[i].consumer)) { 4787 - consumers[i].consumer = NULL; 4788 4787 ret = dev_err_probe(dev, PTR_ERR(consumers[i].consumer), 4789 4788 "Failed to get supply '%s'", 4790 4789 consumers[i].supply); 4790 + consumers[i].consumer = NULL; 4791 4791 goto err; 4792 4792 } 4793 4793