]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Wed, 2 Feb 2011 20:11:41 +0000 (21:11 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 2 Feb 2011 20:52:06 +0000 (20:52 +0000)
commitf127f2f8e11a285e3411211dcc9ef5a8a3f970fa
tree27838d15c8936bff0329c7092e1eaae749a36246
parentd8c28ca3964855d57e56e95f8b2ab477d0f64491
ASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()

The .card member of the snd_soc_pcm_runtime structure pointed to by the
snd_soc_dai_link.init() argument used to be initialized before the
function being called. This has changed, probably unintentionally,
after recent refactorings. Since the function implementations are free
to make use of this pointer, move its assignment back before the
function is called to avoid NULL pointer dereferences.

Created and tested on Amstrad Delta againts linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c