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)
commit43556516fffe1d2be2d4a73cfe7cd34d6062dd11
treeb5b5f847ac171b6652e778ff886c7c1023a0b0d0
parentf80beaf6f2b1eb55fb1b2128a43e0a0c9c4d19de
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