mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-08 18:35:20 +02:00
regulator: Return actual error in of_regulator_bulk_get_all()
[ Upstream commit395a41a1d3
] If regulator_get() in of_regulator_bulk_get_all() returns an error, that error gets overridden and -EINVAL is always passed out. This masks probe deferral requests and likely won't work properly in all cases. Fix this by letting of_regulator_bulk_get_all() return the original error code. Fixes:27b9ecc7a9
("regulator: Add of_regulator_bulk_get_all") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20240822072047.3097740-3-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3bf127bc26
commit
1ccd886abf
|
@ -768,7 +768,7 @@ restart:
|
||||||
name[i] = '\0';
|
name[i] = '\0';
|
||||||
tmp = regulator_get(dev, name);
|
tmp = regulator_get(dev, name);
|
||||||
if (IS_ERR(tmp)) {
|
if (IS_ERR(tmp)) {
|
||||||
ret = -EINVAL;
|
ret = PTR_ERR(tmp);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
(*consumers)[n].consumer = tmp;
|
(*consumers)[n].consumer = tmp;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user