diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-11-05 12:40:07 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-07 14:55:17 -0500 |
commit | cb1b10262f986f865fdbafd0af3327f15f83b8af (patch) | |
tree | 6529a2f782b7c840424ed6e989bda56c8cae1475 /sound | |
parent | 5f29d4455992ab2edcaa377d4ef61b60240781ac (diff) |
ASoC: txx9: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/txx9/txx9aclc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c index 45a6428cba8d..fbd077f4de72 100644 --- a/sound/soc/txx9/txx9aclc.c +++ b/sound/soc/txx9/txx9aclc.c | |||
@@ -115,8 +115,8 @@ static void txx9aclc_dma_complete(void *arg) | |||
115 | spin_lock_irqsave(&dmadata->dma_lock, flags); | 115 | spin_lock_irqsave(&dmadata->dma_lock, flags); |
116 | if (dmadata->frag_count >= 0) { | 116 | if (dmadata->frag_count >= 0) { |
117 | dmadata->dmacount--; | 117 | dmadata->dmacount--; |
118 | BUG_ON(dmadata->dmacount < 0); | 118 | if (!WARN_ON(dmadata->dmacount < 0)) |
119 | tasklet_schedule(&dmadata->tasklet); | 119 | tasklet_schedule(&dmadata->tasklet); |
120 | } | 120 | } |
121 | spin_unlock_irqrestore(&dmadata->dma_lock, flags); | 121 | spin_unlock_irqrestore(&dmadata->dma_lock, flags); |
122 | } | 122 | } |
@@ -181,7 +181,10 @@ static void txx9aclc_dma_tasklet(unsigned long data) | |||
181 | spin_unlock_irqrestore(&dmadata->dma_lock, flags); | 181 | spin_unlock_irqrestore(&dmadata->dma_lock, flags); |
182 | return; | 182 | return; |
183 | } | 183 | } |
184 | BUG_ON(dmadata->dmacount >= NR_DMA_CHAIN); | 184 | if (WARN_ON(dmadata->dmacount >= NR_DMA_CHAIN)) { |
185 | spin_unlock_irqrestore(&dmadata->dma_lock, flags); | ||
186 | return; | ||
187 | } | ||
185 | while (dmadata->dmacount < NR_DMA_CHAIN) { | 188 | while (dmadata->dmacount < NR_DMA_CHAIN) { |
186 | dmadata->dmacount++; | 189 | dmadata->dmacount++; |
187 | spin_unlock_irqrestore(&dmadata->dma_lock, flags); | 190 | spin_unlock_irqrestore(&dmadata->dma_lock, flags); |