Commit 1ebd494
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: 33ada14 ("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>1 parent 7d783d9 commit 1ebd494
1 file changed
Lines changed: 4 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
4471 | 4468 | | |
4472 | 4469 | | |
4473 | 4470 | | |
4474 | | - | |
4475 | | - | |
4476 | 4471 | | |
4477 | 4472 | | |
4478 | 4473 | | |
| |||
4758 | 4753 | | |
4759 | 4754 | | |
4760 | 4755 | | |
4761 | | - | |
| 4756 | + | |
4762 | 4757 | | |
4763 | 4758 | | |
4764 | 4759 | | |
| |||
4774 | 4769 | | |
4775 | 4770 | | |
4776 | 4771 | | |
4777 | | - | |
4778 | | - | |
4779 | | - | |
4780 | | - | |
4781 | | - | |
| 4772 | + | |
| 4773 | + | |
4782 | 4774 | | |
4783 | 4775 | | |
4784 | 4776 | | |
4785 | 4777 | | |
4786 | 4778 | | |
4787 | | - | |
4788 | | - | |
4789 | | - | |
4790 | | - | |
4791 | | - | |
4792 | | - | |
4793 | | - | |
4794 | | - | |
4795 | 4779 | | |
4796 | 4780 | | |
4797 | 4781 | | |
| |||
0 commit comments