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)
committerLee Jones <lee@kernel.org>
Thu, 15 Jun 2023 14:05:29 +0000 (15:05 +0100)
commitf592cf624531286f8b52e40dcfc157a5a7fb115c
treea7841b5ff04042cb22b1d963b30633cb2611aed5
parentd918e0d5824495a75d00b879118b098fcab36fdb
mfd: stmfx: Fix error path in stmfx_chip_init

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>
drivers/mfd/stmfx.c