ASoC: Fix missing spin_unlock_irqrestore
authorAxel Lin <axel.lin@gmail.com>
Mon, 29 Nov 2010 09:42:47 +0000 (17:42 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 30 Nov 2010 11:09:24 +0000 (11:09 +0000)
commit3f1af9d26fb02a99a60a045b8ae93ccc6fe50b97
tree6af31955dd83eb3718050a5a0eeb1887bc8504b2
parent39a545559f8d5f13e8a4a7dfddcaad0e2ba9bcfb
ASoC: Fix missing spin_unlock_irqrestore

In nuc900_dma_hw_params(), if snd_pcm_lib_malloc_pages failed
it returns without calling spin_unlock_irqrestore().

Since snd_pcm_lib_malloc_pages() does not touch struct nuc900_audio,
we don't need to hold the lock while calling snd_pcm_lib_malloc_pages().
Fix it by moving spin_lock_irqsave() down to after snd_pcm_lib_malloc_pages().

In nuc900_dma_prepare(), spin_unlock_irqrestore() is missing in the error path.
Fix it by removing the return in default case.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/nuc900/nuc900-pcm.c