patch-2.4.19 linux-2.4.19/drivers/sound/sonicvibes.c
Next file: linux-2.4.19/drivers/sound/sound_config.h
Previous file: linux-2.4.19/drivers/sound/sb_card.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/sound/sonicvibes.c
- Orig date:
Mon Feb 25 11:38:07 2002
diff -urN linux-2.4.18/drivers/sound/sonicvibes.c linux-2.4.19/drivers/sound/sonicvibes.c
@@ -1802,7 +1802,7 @@
if (s->dma_adc.mapped)
s->dma_adc.count &= s->dma_adc.fragsize-1;
spin_unlock_irqrestore(&s->lock, flags);
- return copy_to_user((void *)arg, &cinfo, sizeof(cinfo));
+ return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
case SNDCTL_DSP_GETOPTR:
if (!(file->f_mode & FMODE_WRITE))
@@ -1820,7 +1820,7 @@
if (s->dma_dac.mapped)
s->dma_dac.count &= s->dma_dac.fragsize-1;
spin_unlock_irqrestore(&s->lock, flags);
- return copy_to_user((void *)arg, &cinfo, sizeof(cinfo));
+ return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
case SNDCTL_DSP_GETBLKSIZE:
if (file->f_mode & FMODE_WRITE) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)