]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: dmaengine: do not use a NULL prepare_slave_config() callback
authorCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
Mon, 7 Mar 2022 12:21:57 +0000 (14:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:05:54 +0000 (14:05 +0200)
commit3cbe0872818c6943517261f79e7be1594733621f
tree7594f79c69bec04e12f0104cdabeadbf65764da9
parent7a752cb8e75979c0c0eb98e92f5887364007b41e
ASoC: dmaengine: do not use a NULL prepare_slave_config() callback

[ Upstream commit 9a1e13440a4f2e7566fd4c5eae6a53e6400e08a4 ]

Even if struct snd_dmaengine_pcm_config is used, prepare_slave_config()
callback might not be set. Check if this callback is set before using it.

Fixes: fa654e085300 ("ASoC: dmaengine-pcm: Provide default config")
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20220307122202.2251639-2-codrin.ciubotariu@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/soc-generic-dmaengine-pcm.c