summaryrefslogtreecommitdiff
path: root/sound/pci/es1938.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 17:12:14 +0200
committerJaroslav Kysela <perex@perex.cz>2008-08-13 11:46:38 +0200
commitda3cec35dd3c31d8706db4bf379372ce70d92118 (patch)
tree9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/es1938.c
parent622207dc31895b4e82c39100db8635d885c795e2 (diff)
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/es1938.c')
-rw-r--r--sound/pci/es1938.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index 84fac1fbf103..4cd9a1faaecc 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -860,7 +860,8 @@ static int snd_es1938_capture_copy(struct snd_pcm_substream *substream,
struct es1938 *chip = snd_pcm_substream_chip(substream);
pos <<= chip->dma1_shift;
count <<= chip->dma1_shift;
- snd_assert(pos + count <= chip->dma1_size, return -EINVAL);
+ if (snd_BUG_ON(pos + count > chip->dma1_size))
+ return -EINVAL;
if (pos + count < chip->dma1_size) {
if (copy_to_user(dst, runtime->dma_area + pos + 1, count))
return -EFAULT;