]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: codecs: rt5665: Fix some error handling paths in rt5665_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 22 Mar 2025 07:45:49 +0000 (08:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:32 +0000 (14:39 +0200)
commitd3b862658669dfeb007d4b312556e526439e8129
tree5e93d78199361ea53d0c51abebd903da919ff4a2
parentc76bb2d0aa54d8be4102e5480fa6bec353381699
ASoC: codecs: rt5665: Fix some error handling paths in rt5665_probe()

[ Upstream commit 1ebd4944266e86a7ce274f197847f5a6399651e8 ]

Should an error occur after a successful regulator_bulk_enable() call,
regulator_bulk_disable() should be called, as already done in the remove
function.

Instead of adding an error handling path in the probe, switch from
devm_regulator_bulk_get() to devm_regulator_bulk_get_enable() and
simplify the remove function and some other places accordingly.

Finally, add a missing const when defining rt5665_supply_names to please
checkpatch and constify a few bytes.

Fixes: 33ada14a26c8 ("ASoC: add rt5665 codec driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/e3c2aa1b2fdfa646752d94f4af968630c0d58248.1742629525.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/rt5665.c