From: Dan Carpenter Date: Mon, 11 Jan 2021 09:50:21 +0000 (+0300) Subject: ASoC: soc-pcm: Fix an uninitialized error code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e91b65b36fde0690f1c694f17dd1b549295464a7;p=linux.git ASoC: soc-pcm: Fix an uninitialized error code 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 Link: https://lore.kernel.org/r/X/wfXQFxeMLvpO+1@mwanda Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 29328ce39904a..a253c9f918e1e 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2444,6 +2444,7 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream) ret = -EINVAL; dev_err(fe->dev, "ASoC: FE %s is not ready %d\n", fe->dai_link->name, fe->dpcm[stream].state); + ret = -EINVAL; goto disconnect; }