mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 12:00:22 +09:00
mfd: stmfx: Fix error path in stmfx_chip_init
[ Upstream commitf592cf6245] 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:06252ade91("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9783c2ec8d
commit
b1dbc919c1
@@ -387,7 +387,7 @@ static int stmfx_chip_init(struct i2c_client *client)
|
||||
|
||||
err:
|
||||
if (stmfx->vdd)
|
||||
return regulator_disable(stmfx->vdd);
|
||||
regulator_disable(stmfx->vdd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user