Browse Source

ASoC: s6000: 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>
Takashi Iwai 11 years ago
parent
commit
4a318f1e6c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      sound/soc/s6000/s6000-pcm.c

+ 2 - 1
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);