* [PATCH] ASoC: soc-pcm: Fix an uninitialized error code
@ 2021-01-11 9:50 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages 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] 3+ messages in thread* [PATCH] ASoC: soc-pcm: Fix an uninitialized error code
@ 2021-01-11 9:50 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages 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] 3+ messages in thread* Re: [PATCH] ASoC: soc-pcm: Fix an uninitialized error code
2021-01-11 9:50 ` Dan Carpenter
(?)
@ 2021-01-11 16:27 ` Mark Brown
-1 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-01-11 16:27 UTC (permalink / raw)
To: Dan Carpenter, Liam Girdwood, 朱灿灿
Cc: alsa-devel, kernel-janitors, Takashi Iwai
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-11 16:29 UTC | newest]
Thread overview: 3+ messages (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
2021-01-11 9:50 ` Dan Carpenter
2021-01-11 16:27 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.