diff options
author | Amelie Delaunay <[email protected]> | 2023-06-09 11:28:03 +0200 |
---|---|---|
committer | Lee Jones <[email protected]> | 2023-06-15 15:05:29 +0100 |
commit | f592cf624531286f8b52e40dcfc157a5a7fb115c (patch) | |
tree | a7841b5ff04042cb22b1d963b30633cb2611aed5 | |
parent | d918e0d5824495a75d00b879118b098fcab36fdb (diff) |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lee Jones <[email protected]>
-rw-r--r-- | drivers/mfd/stmfx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c index f30c7c304147..54cc902cb578 100644 --- a/drivers/mfd/stmfx.c +++ b/drivers/mfd/stmfx.c @@ -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; } |