[alsa-devel] [PATCH 17/31] ASoC: s6000: Use WARN_ON() instead of BUG_ON()
Takashi Iwai
tiwai at suse.de
Tue Nov 5 18:40:04 CET 2013
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
sound/soc/s6000/s6000-pcm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c
index d0740a762963..5cfaa5464eba 100644
--- a/sound/soc/s6000/s6000-pcm.c
+++ b/sound/soc/s6000/s6000-pcm.c
@@ -90,7 +90,8 @@ static void s6000_pcm_enqueue_dma(struct snd_pcm_substream *substream)
return;
}
- BUG_ON(period_size & 15);
+ if (WARN_ON(period_size & 15))
+ return;
s6dmac_put_fifo(DMA_MASK_DMAC(channel), DMA_INDEX_CHNL(channel),
src, dst, period_size);
--
1.8.4.2
More information about the Alsa-devel
mailing list