* [PATCH] ASoC: soc-pcm: Fix an uninitialized error code
@ 2021-01-11 9:50 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-01-11 9:50 UTC (permalink / raw)
To: Liam Girdwood, 朱灿灿
Cc: alsa-devel, Mark Brown, kernel-janitors, Takashi Iwai
The error path here doesn't set "ret" so it returns uninitialized data
instead of a negative error code.
Fixes: 2c1382840c19 ("ASoC: soc-pcm: disconnect BEs if the FE is not ready")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
sound/soc/soc-pcm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 481a4a25acb0..489697963dd3 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2443,6 +2443,7 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream)
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE) {
dev_err(fe->dev, "ASoC: FE %s is not ready %d\n",
fe->dai_link->name, fe->dpcm[stream].state);
+ ret = -EINVAL;
goto disconnect;
}
--
2.29.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-11 9:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-11 9:50 [PATCH] ASoC: soc-pcm: Fix an uninitialized error code Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox