diff options
-rw-r--r-- | sound/isa/sb/emu8000_pcm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c index ccedbfed061a..2f85c66f8e38 100644 --- a/sound/isa/sb/emu8000_pcm.c +++ b/sound/isa/sb/emu8000_pcm.c | |||
@@ -433,7 +433,8 @@ static int emu8k_transfer_block(struct snd_emu8000 *emu, int offset, unsigned sh | |||
433 | while (count > 0) { | 433 | while (count > 0) { |
434 | unsigned short sval; | 434 | unsigned short sval; |
435 | CHECK_SCHEDULER(); | 435 | CHECK_SCHEDULER(); |
436 | get_user(sval, buf); | 436 | if (get_user(sval, buf)) |
437 | return -EFAULT; | ||
437 | EMU8000_SMLD_WRITE(emu, sval); | 438 | EMU8000_SMLD_WRITE(emu, sval); |
438 | buf++; | 439 | buf++; |
439 | count--; | 440 | count--; |
@@ -525,12 +526,14 @@ static int emu8k_pcm_copy(struct snd_pcm_substream *subs, | |||
525 | while (count-- > 0) { | 526 | while (count-- > 0) { |
526 | unsigned short sval; | 527 | unsigned short sval; |
527 | CHECK_SCHEDULER(); | 528 | CHECK_SCHEDULER(); |
528 | get_user(sval, buf); | 529 | if (get_user(sval, buf)) |
530 | return -EFAULT; | ||
529 | EMU8000_SMLD_WRITE(emu, sval); | 531 | EMU8000_SMLD_WRITE(emu, sval); |
530 | buf++; | 532 | buf++; |
531 | if (rec->voices > 1) { | 533 | if (rec->voices > 1) { |
532 | CHECK_SCHEDULER(); | 534 | CHECK_SCHEDULER(); |
533 | get_user(sval, buf); | 535 | if (get_user(sval, buf)) |
536 | return -EFAULT; | ||
534 | EMU8000_SMRD_WRITE(emu, sval); | 537 | EMU8000_SMRD_WRITE(emu, sval); |
535 | buf++; | 538 | buf++; |
536 | } | 539 | } |