diff options
author | Amelie Delaunay | 2023-06-09 11:28:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-07-19 16:21:57 +0200 |
commit | e716693f0236d968b4720534faa3b3708116517f (patch) | |
tree | 11bc221552450b3da7566aa039928a3c0b3f17ec /lib/test-kstrtox.c | |
parent | 18abe5f4c3c6c3436c82382502c437505a7bd1ba (diff) |
mfd: stmfx: Nullify stmfx->vdd in case of error
[ Upstream commit 7c81582c0bccb4757186176f0ee12834597066ad ]
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: d75846ed08e6 ("mfd: stmfx: Fix dev_err_probe() call in stmfx_chip_init()")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20230609092804.793100-2-amelie.delaunay@foss.st.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/test-kstrtox.c')
0 files changed, 0 insertions, 0 deletions