Skip to content

Commit f592cf6

Browse files
ADESTMlag-linaro
authored andcommitted
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: 06252ad ("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>
1 parent d918e0d commit f592cf6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mfd/stmfx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static int stmfx_chip_init(struct i2c_client *client)
387387

388388
err:
389389
if (stmfx->vdd)
390-
return regulator_disable(stmfx->vdd);
390+
regulator_disable(stmfx->vdd);
391391

392392
return ret;
393393
}

0 commit comments

Comments
 (0)