[alsa-devel] [PATCH 2/4] ASoC: simple-scu-card: tidyup return method from probe()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Fri May 19 02:57:44 CEST 2017


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

Current return method from probe() is very confusable.
This patch tidyup it to normal return method

Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/generic/simple-scu-card.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c
index 1e8c42d..a75b385 100644
--- a/sound/soc/generic/simple-scu-card.c
+++ b/sound/soc/generic/simple-scu-card.c
@@ -269,8 +269,10 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
 	snd_soc_card_set_drvdata(card, priv);
 
 	ret = devm_snd_soc_register_card(dev, card);
-	if (ret >= 0)
-		return ret;
+	if (ret < 0)
+		goto err;
+
+	return 0;
 err:
 	asoc_simple_card_clean_reference(card);
 
-- 
1.9.1



More information about the Alsa-devel mailing list