diff mbox series

ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry()

Message ID 20210614071746.1787072-1-perex@perex.cz (mailing list archive)
State Accepted
Commit 12ffd726824a2f52486f72338b6fd3244b512959
Headers show
Series ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() | expand

Commit Message

Jaroslav Kysela June 14, 2021, 7:17 a.m. UTC
In case, where the loops are not executed for a reason, the uninitialized
variable 'err' is returned to the caller. Make code fully predictible
and assign zero in the declaration.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: Mark Brown <broonie@kernel.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown June 14, 2021, 7:53 p.m. UTC | #1
On Mon, 14 Jun 2021 09:17:46 +0200, Jaroslav Kysela wrote:
> In case, where the loops are not executed for a reason, the uninitialized
> variable 'err' is returned to the caller. Make code fully predictible
> and assign zero in the declaration.

Applied to

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

Thanks!

[1/1] ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry()
      commit: 12ffd726824a2f52486f72338b6fd3244b512959

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 8659089a87a0..46513bb97904 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1700,7 +1700,7 @@  static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream,
 	struct snd_soc_dpcm *dpcm;
 	struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream);
 	struct snd_soc_dai *fe_cpu_dai;
-	int err;
+	int err = 0;
 	int i;
 
 	/* apply symmetry for FE */