patch-2.4.0-test8 linux/drivers/sound/nm256_audio.c
Next file: linux/drivers/sound/sonicvibes.c
Previous file: linux/drivers/sound/maestro.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sun Sep 3 20:59:57 2000
- Orig file:
v2.4.0-test7/linux/drivers/sound/nm256_audio.c
- Orig date:
Wed Aug 23 18:36:38 2000
diff -u --recursive --new-file v2.4.0-test7/linux/drivers/sound/nm256_audio.c linux/drivers/sound/nm256_audio.c
@@ -1419,7 +1419,8 @@
switch (cmd)
{
case SOUND_PCM_WRITE_RATE:
- get_user_ret(ret, (int *) arg, -EFAULT);
+ if (get_user(ret, (int *) arg))
+ return -EFAULT;
if (ret != 0) {
oldinfo = card->sinfo[w].samplerate;
@@ -1437,7 +1438,8 @@
break;
case SNDCTL_DSP_STEREO:
- get_user_ret(ret, (int *) arg, -EFAULT);
+ if (get_user(ret, (int *) arg))
+ return -EFAULT;
card->sinfo[w].stereo = ret ? 1 : 0;
ret = nm256_setInfo (dev, card);
@@ -1447,7 +1449,8 @@
break;
case SOUND_PCM_WRITE_CHANNELS:
- get_user_ret(ret, (int *) arg, -EFAULT);
+ if (get_user(ret, (int *) arg))
+ return -EFAULT;
if (ret < 1 || ret > 3)
ret = card->sinfo[w].stereo + 1;
@@ -1464,7 +1467,8 @@
break;
case SNDCTL_DSP_SETFMT:
- get_user_ret(ret, (int *) arg, -EFAULT);
+ if (get_user(ret, (int *) arg))
+ return -EFAULT;
if (ret != 0) {
oldinfo = card->sinfo[w].bits;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)