]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regulator: Return actual error in of_regulator_bulk_get_all()
authorChen-Yu Tsai <wenst@chromium.org>
Thu, 22 Aug 2024 07:20:45 +0000 (15:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:02 +0000 (16:29 +0200)
commit1ccd886abf45aeb6bca5c45a0ed19cd31dceb070
tree55bd8e2c882580ba2cb7cb6143eba66504d9e93c
parent3bf127bc26959385e03ca788bbea4cba15d0bfed
regulator: Return actual error in of_regulator_bulk_get_all()

[ Upstream commit 395a41a1d3e377462f3eea8a205ee72be8885ff6 ]

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: 27b9ecc7a9ba ("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>
drivers/regulator/of_regulator.c