mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()'
@ 2019-12-26 16:29 Christophe JAILLET
  2019-12-30 10:44 ` Charles Keepax
  2019-12-31  0:30 ` Applied "ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()'" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2019-12-26 16:29 UTC (permalink / raw)
  To: brian.austin, Paul.Handrigan, ckeepax, rf, lgirdwood, broonie,
	perex, tiwai
  Cc: alsa-devel, patches, linux-kernel, kernel-janitors, Christophe JAILLET

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>
---
 sound/soc/codecs/cs47l92.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs47l92.c b/sound/soc/codecs/cs47l92.c
index d50f75f3b3e4..536b7d35d6b2 100644
--- a/sound/soc/codecs/cs47l92.c
+++ b/sound/soc/codecs/cs47l92.c
@@ -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]);
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-31  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26 16:29 [PATCH] ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()' Christophe JAILLET
2019-12-30 10:44 ` Charles Keepax
2019-12-31  0:30 ` Applied "ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()'" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®