]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/es1938.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / es1938.c
index 84fac1fbf10399bf9a3c0008945e78e9ad8c1d0f..4cd9a1faaecc186732b1ad911ebfd74e3c59e77e 100644 (file)
@@ -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;