aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/es1938.c
diff options
context:
space:
mode:
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,
860 struct es1938 *chip = snd_pcm_substream_chip(substream); 860 struct es1938 *chip = snd_pcm_substream_chip(substream);
861 pos <<= chip->dma1_shift; 861 pos <<= chip->dma1_shift;
862 count <<= chip->dma1_shift; 862 count <<= chip->dma1_shift;
863 snd_assert(pos + count <= chip->dma1_size, return -EINVAL); 863 if (snd_BUG_ON(pos + count > chip->dma1_size))
864 return -EINVAL;
864 if (pos + count < chip->dma1_size) { 865 if (pos + count < chip->dma1_size) {
865 if (copy_to_user(dst, runtime->dma_area + pos + 1, count)) 866 if (copy_to_user(dst, runtime->dma_area + pos + 1, count))
866 return -EFAULT; 867 return -EFAULT;