]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMark Brown <broonie@kernel.org>
Mon, 31 Mar 2025 15:14:07 +0000 (16:14 +0100)
commit1ebd4944266e86a7ce274f197847f5a6399651e8
tree2e4e68107401cc924ad7ef22d14201a373853310
parent7d783d9074cb1d54179ca03df514fe4b0bbae5ab
ASoC: codecs: rt5665: Fix some error handling paths in rt5665_probe()

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>
sound/soc/codecs/rt5665.c