]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mfd: stmfx: Fix error path in stmfx_chip_init
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Fri, 9 Jun 2023 09:28:03 +0000 (11:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:21 +0000 (08:37 +0200)
commitbaec796723b7723e3b8bdb041399d10a8776a341
tree207b1e1672575e4a0f5f053beaa4f1b449b8a6d3
parent5d26f134efa899ed9546e590a842e0963a3248fc
mfd: stmfx: Fix error path in stmfx_chip_init

[ Upstream commit f592cf624531286f8b52e40dcfc157a5a7fb115c ]

In error path, disable vdd regulator if it exists, but don't overload ret.
Because if regulator_disable() is successful, stmfx_chip_init will exit
successfully while chip init failed.

Fixes: 06252ade9156 ("mfd: Add ST Multi-Function eXpander (STMFX) core driver")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20230609092804.793100-1-amelie.delaunay@foss.st.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/stmfx.c