From 1162484fe0492246e630f20ec864dc60c1663bfd Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 6 Sep 2003 00:34:27 -0700 Subject: [PATCH] [PATCH] janitor: oss/ali copy*user fixes From: Daniele Bellucci --- sound/oss/ali5455.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c index 7bb3d707d6c8a..a35ffba5e6d2f 100644 --- a/sound/oss/ali5455.c +++ b/sound/oss/ali5455.c @@ -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, cinfo.blocks, cinfo.ptr, dmabuf->count); #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: if (!(file->f_mode & FMODE_READ)) return -EINVAL; @@ -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, cinfo.blocks, cinfo.ptr, dmabuf->count); #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: #ifdef DEBUG printk("SNDCTL_DSP_NONBLOCK\n"); -- 2.53.0