]> git.hungrycats.org Git - linux/commit
ASoC: dapm: Fix NULL pointer deference on CODEC to CODEC DAIs
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 15 Aug 2018 12:11:35 +0000 (13:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:18:12 +0000 (09:18 +0200)
commit6e6b32ed04131df7882a834d1c0ab81b82a0fb25
treef541f0fab7e10181c34e865fec7b49d56c97fcb6
parentffac8fa2bee5cf63ee11666e5b60639b5f800007
ASoC: dapm: Fix NULL pointer deference on CODEC to CODEC DAIs

[ Upstream commit 249dc49576fc953a7378b916c6a6d47ea81e4da2 ]

Commit a655de808cbde ("ASoC: core: Allow topology to override
machine driver FE DAI link config.") caused soc_dai_hw_params to
be come dependent on the substream private_data being set with
a pointer to the snd_soc_pcm_runtime. Currently, CODEC to CODEC
links don't set this, which causes a NULL pointer dereference:

[<4069de54>] (soc_dai_hw_params) from
[<40694b68>] (snd_soc_dai_link_event+0x1a0/0x380)

Since the ASoC core in general assumes that the substream
private_data will be set to a pointer to the snd_soc_pcm_runtime,
update the CODEC to CODEC links to respect this.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/sound/soc-dapm.h
sound/soc/soc-core.c
sound/soc/soc-dapm.c