diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 09:05:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 09:05:39 -0400 |
commit | a9b9e81c915e4a57ac3b21d1a7fa7ff184639780 (patch) | |
tree | 98304395fbb5b9c74fca35b196cd414c1949f280 /sound/pci/es1938.c | |
parent | a8b71a2810386a5ac8f43d2095fe3355f0d8db37 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/memory-corruption-check
Diffstat (limited to 'sound/pci/es1938.c')
-rw-r--r-- | sound/pci/es1938.c | 3 |
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; |