Commit c5e2f6f2 authored by Amelie Delaunay's avatar Amelie Delaunay Committed by Greg Kroah-Hartman
Browse files

mfd: stmfx: Nullify stmfx->vdd in case of error



[ Upstream commit 7c81582c ]

Nullify stmfx->vdd in case devm_regulator_get_optional() returns an error.
And simplify code by returning an error only if return code is not -ENODEV,
which means there is no vdd regulator and it is not an issue.

Fixes: d75846ed ("mfd: stmfx: Fix dev_err_probe() call in stmfx_chip_init()")
Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20230609092804.793100-2-amelie.delaunay@foss.st.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 30ead8b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment