Skip to content

Commit

Permalink
ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()'
Browse files Browse the repository at this point in the history
If 'madera_init_bus_error_irq()' fails,
'wm_adsp2_remove(&cs47l92->core.adsp[0])' will be called twice.
Once in the 'if' block, and once in the error handling path.
This is harmless, but one of this call can be axed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20191226162907.9490-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Christophe JAILLET authored and Mark Brown committed Dec 31, 2019
1 parent 5def013 commit 9ea7a99
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sound/soc/codecs/cs47l92.c
Original file line number Diff line number Diff line change
Expand Up @@ -1959,10 +1959,8 @@ static int cs47l92_probe(struct platform_device *pdev)
goto error_dsp_irq;

ret = madera_init_bus_error_irq(&cs47l92->core, 0, wm_adsp2_bus_error);
if (ret != 0) {
wm_adsp2_remove(&cs47l92->core.adsp[0]);
if (ret != 0)
goto error_adsp;
}

madera_init_fll(madera, 1, MADERA_FLL1_CONTROL_1 - 1,
&cs47l92->fll[0]);
Expand Down

0 comments on commit 9ea7a99

Please sign in to comment.