]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: fix an Oops, caused by invalid topology
authorGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Fri, 24 Jan 2020 21:36:19 +0000 (15:36 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 27 Jan 2020 17:51:49 +0000 (17:51 +0000)
commit70d090b88fd15c160dd0e4721ff50fcbc5083656
treed5a79d696cebb2759b3df053286be441310c9555
parent03e7fbe2e4d3f8a82fedc91636c6350c4b59ae87
ASoC: SOF: fix an Oops, caused by invalid topology

It is possible to create invalid topology that will cause a kernel
Oops when trying to allocate buffers for a NULL substream.
Specifically such an Oops was caused by a topology, where a DAI on a
capture pipeline was referencing the PCM ID from a playback pipeline.
Fix the Oops by explicitly checking for NULL.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200124213625.30186-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c