Commit 1162484f authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] janitor: oss/ali copy*user fixes

From: Daniele Bellucci <bellucda@tiscali.it>
parent 62033f29
...@@ -2409,7 +2409,7 @@ static int ali_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u ...@@ -2409,7 +2409,7 @@ static int ali_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
printk("SNDCTL_DSP_GETOPTR %d, %d, %d, %d\n", cinfo.bytes, printk("SNDCTL_DSP_GETOPTR %d, %d, %d, %d\n", cinfo.bytes,
cinfo.blocks, cinfo.ptr, dmabuf->count); cinfo.blocks, cinfo.ptr, dmabuf->count);
#endif #endif
return copy_to_user((void *) arg, &cinfo, sizeof(cinfo)); return copy_to_user((void *) arg, &cinfo, sizeof(cinfo))? -EFAULT : 0;
case SNDCTL_DSP_GETISPACE: case SNDCTL_DSP_GETISPACE:
if (!(file->f_mode & FMODE_READ)) if (!(file->f_mode & FMODE_READ))
return -EINVAL; return -EINVAL;
...@@ -2448,7 +2448,7 @@ static int ali_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u ...@@ -2448,7 +2448,7 @@ static int ali_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
printk("SNDCTL_DSP_GETIPTR %d, %d, %d, %d\n", cinfo.bytes, printk("SNDCTL_DSP_GETIPTR %d, %d, %d, %d\n", cinfo.bytes,
cinfo.blocks, cinfo.ptr, dmabuf->count); cinfo.blocks, cinfo.ptr, dmabuf->count);
#endif #endif
return copy_to_user((void *) arg, &cinfo, sizeof(cinfo)); return copy_to_user((void *) arg, &cinfo, sizeof(cinfo))? -EFAULT: 0;
case SNDCTL_DSP_NONBLOCK: case SNDCTL_DSP_NONBLOCK:
#ifdef DEBUG #ifdef DEBUG
printk("SNDCTL_DSP_NONBLOCK\n"); printk("SNDCTL_DSP_NONBLOCK\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment