]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-generic-dmaengine-pcm: Use default config when none is given
authorSascha Hauer <s.hauer@pengutronix.de>
Mon, 2 May 2022 13:13:35 +0000 (15:13 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 4 May 2022 14:31:19 +0000 (15:31 +0100)
commit759f137d3411aa995e56b154852bc8d5a29b1e36
treeb5b5f847ac171b6652e778ff886c7c1023a0b0d0
parent1730d546c86bb99ec8e137960f8080d76f641f0b
ASoC: soc-generic-dmaengine-pcm: Use default config when none is given

snd_dmaengine_pcm_register() can be passed a NULL pointer for the config
which means that the we have to test for pcm->config being non NULL
before accessing it. Make the code more straight forward by providing a
default config when none is passed. With this pcm->config is never NULL
and we can skip all the if (pcm->config) tests.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220502131335.2604158-1-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-generic-dmaengine-pcm.c