diff mbox series

ASoC: soc-pcm: Fix an uninitialized error code

Message ID X/wfXQFxeMLvpO+1@mwanda (mailing list archive)
State New, archived
Headers show
Series ASoC: soc-pcm: Fix an uninitialized error code | expand

Commit Message

Dan Carpenter Jan. 11, 2021, 9:50 a.m. UTC
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(+)

Comments

Mark Brown Jan. 11, 2021, 4:27 p.m. UTC | #1
On Mon, 11 Jan 2021 12:50:21 +0300, Dan Carpenter wrote:
> The error path here doesn't set "ret" so it returns uninitialized data
> instead of a negative error code.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-pcm: Fix an uninitialized error code
      commit: e91b65b36fde0690f1c694f17dd1b549295464a7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

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;
 	}