From: Al Viro Date: Wed, 4 May 2005 04:40:02 +0000 (+0100) Subject: [PATCH] sonypi trivial user annotations X-Git-Tag: v2.6.12-rc4~117^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0555985d046348b39e44ff1da2719d73409d7981;p=linux-2.6 [PATCH] sonypi trivial user annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index c812191417..fd04206080 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -1021,11 +1021,11 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, ret = -EIO; break; } - if (copy_to_user((u8 *)arg, &val8, sizeof(val8))) + if (copy_to_user(argp, &val8, sizeof(val8))) ret = -EFAULT; break; case SONYPI_IOCSFAN: - if (copy_from_user(&val8, (u8 *)arg, sizeof(val8))) { + if (copy_from_user(&val8, argp, sizeof(val8))) { ret = -EFAULT; break; } @@ -1038,7 +1038,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, ret = -EIO; break; } - if (copy_to_user((u8 *)arg, &val8, sizeof(val8))) + if (copy_to_user(argp, &val8, sizeof(val8))) ret = -EFAULT; break; default: