summaryrefslogtreecommitdiffstats
path: root/drivers/sound/via82cxxx_audio.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /drivers/sound/via82cxxx_audio.c
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'drivers/sound/via82cxxx_audio.c')
-rw-r--r--drivers/sound/via82cxxx_audio.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/sound/via82cxxx_audio.c b/drivers/sound/via82cxxx_audio.c
index 7ed78c980..a58b333fd 100644
--- a/drivers/sound/via82cxxx_audio.c
+++ b/drivers/sound/via82cxxx_audio.c
@@ -1900,7 +1900,8 @@ static int via_dsp_ioctl (struct inode *inode, struct file *file,
/* query or set current channel's PCM data format */
case SNDCTL_DSP_SETFMT:
- get_user_ret(val, (int *)arg, -EFAULT);
+ if (get_user(val, (int *)arg))
+ return -EFAULT;
if (val != AFMT_QUERY) {
rc = 0;
@@ -1928,7 +1929,8 @@ static int via_dsp_ioctl (struct inode *inode, struct file *file,
/* query or set number of channels (1=mono, 2=stereo) */
case SNDCTL_DSP_CHANNELS:
- get_user_ret(val, (int *)arg, -EFAULT);
+ if (get_user(val, (int *)arg))
+ return -EFAULT;
if (val != 0) {
rc = 0;
spin_lock_irq (&card->lock);
@@ -1954,7 +1956,8 @@ static int via_dsp_ioctl (struct inode *inode, struct file *file,
/* enable (val is not zero) or disable (val == 0) stereo */
case SNDCTL_DSP_STEREO:
- get_user_ret(val, (int *)arg, -EFAULT);
+ if (get_user(val, (int *)arg))
+ return -EFAULT;
rc = 0;
spin_lock_irq (&card->lock);
if (rc == 0 && rd)
@@ -1969,7 +1972,8 @@ static int via_dsp_ioctl (struct inode *inode, struct file *file,
/* query or set sampling rate */
case SNDCTL_DSP_SPEED:
- get_user_ret(val, (int *)arg, -EFAULT);
+ if (get_user(val, (int *)arg))
+ return -EFAULT;
if (val < 0)
return -EINVAL;
if (val > 0) {
@@ -2061,7 +2065,8 @@ static int via_dsp_ioctl (struct inode *inode, struct file *file,
/* set fragment size. implemented as a successful no-op for now */
case SNDCTL_DSP_SETFRAGMENT:
- get_user_ret(val, (int *)arg, -EFAULT);
+ if (get_user(val, (int *)arg))
+ return -EFAULT;
DPRINTK ("SNDCTL_DSP_SETFRAGMENT (fragshift==0x%04X (%d), maxfrags==0x%04X (%d))\n",
val & 0xFFFF,