alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: qdsp6: q6asm-dai: clean up a return
@ 2018-09-10  8:40 Dan Carpenter
  2018-09-10 10:04 ` Srinivas Kandagatla
  2018-09-10 11:35 ` Applied "ASoC: qdsp6: q6asm-dai: clean up a return" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2018-09-10  8:40 UTC (permalink / raw)
  To: Patrick Lai
  Cc: alsa-devel, Banajit Goswami, kernel-janitors, Takashi Iwai,
	Liam Girdwood, Vinod Koul, Mark Brown, Srinivas Kandagatla,
	Niklas Cassel

Smatch complains that if both "psubstream" and "csubstream" are NULL
then "ret" is uninitialized.  That probably can't happen, but it's
cleaner to just return zero anyway so let's do that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
index 9db9a2944ef2..c75fab38905d 100644
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -493,7 +493,7 @@ static int q6asm_dai_pcm_new(struct snd_soc_pcm_runtime *rtd)
 		}
 	}
 
-	return ret;
+	return 0;
 }
 
 static void q6asm_dai_pcm_free(struct snd_pcm *pcm)

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

end of thread, other threads:[~2018-09-10 11:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-10  8:40 [PATCH] ASoC: qdsp6: q6asm-dai: clean up a return Dan Carpenter
2018-09-10 10:04 ` Srinivas Kandagatla
2018-09-10 11:35 ` Applied "ASoC: qdsp6: q6asm-dai: clean up a return" 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;
as well as URLs for NNTP newsgroup(s).