diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2023-01-23 23:17:20 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 16:26:39 +0100 |
commit | 5609d908743d14e69fc810a15892abaa79f6c5aa (patch) | |
tree | 2faaed669f622a37ab89e219ae2c39cb255ad91b /sound | |
parent | 221bca517bac7dd0d5a28ef8f6c581d51b82c2e6 (diff) | |
download | linux-stable-5609d908743d14e69fc810a15892abaa79f6c5aa.tar.gz linux-stable-5609d908743d14e69fc810a15892abaa79f6c5aa.tar.bz2 linux-stable-5609d908743d14e69fc810a15892abaa79f6c5aa.zip |
ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress()
[ Upstream commit ffe4c0f0bfaa571a676a0e946d4a6a0607f94294 ]
commit d3268a40d4b19f ("ASoC: soc-compress.c: fix NULL dereference")
enables DPCM capture, but it should independent from playback.
This patch fixup it.
Fixes: d3268a40d4b1 ("ASoC: soc-compress.c: fix NULL dereference")
Link: https://lore.kernel.org/r/87tu0i6j7j.wl-kuninori.morimoto.gx@renesas.com
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871qnkvo1s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-compress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 2cb8d3b55fbc..c00f21dbcf11 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -788,7 +788,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->fe_compr = 1; if (rtd->dai_link->dpcm_playback) be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; - else if (rtd->dai_link->dpcm_capture) + if (rtd->dai_link->dpcm_capture) be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); } else { |