ASoC: lpass-platform: initialize dma channel number
authorArnd Bergmann <arnd@arndb.de>
Tue, 8 Nov 2016 13:38:52 +0000 (14:38 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 9 Nov 2016 13:24:57 +0000 (13:24 +0000)
commit3b89e4b77ef9c2f985964fab17032db98f074ed0
tree89fbf01b9a17b790a45695a43ce360b2e782158c
parent94201798dbce1cfd242407f1f422819a735c838f
ASoC: lpass-platform: initialize dma channel number

A bugfix accidentally removed the implicit initialization of the
dma channel number, causing undefined behavior when
v->alloc_dma_channel is NULL:

sound/soc/qcom/lpass-platform.c: In function ‘lpass_platform_pcmops_open’:
sound/soc/qcom/lpass-platform.c:83:29: error: ‘dma_ch’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This adds back an explicit initialization to zero, restoring the
previous behavior for that case.

Fixes: 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/lpass-platform.c