[SCSI] aacraid: Fix return code interpretation
authorMark Haverkamp <markh@osdl.org>
Mon, 12 Jun 2006 17:53:58 +0000 (10:53 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Mon, 12 Jun 2006 19:47:55 +0000 (14:47 -0500)
Received from Mark Salyzyn

clear_user return is 0 for success, the code fragment is written to
assume that it is the count of the number of bytes zero'd.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aacraid/linit.c

index 9647dabc66121b8f1a3da26ae9d8a7ca259eba43..03fe2abcc4fe0c11328b6f7f990320b217409752 100644 (file)
@@ -564,7 +564,7 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long
                
                f = compat_alloc_user_space(sizeof(*f));
                ret = 0;
-               if (clear_user(f, sizeof(*f)) != sizeof(*f))
+               if (clear_user(f, sizeof(*f)))
                        ret = -EFAULT;
                if (copy_in_user(f, (void __user *)arg, sizeof(struct fib_ioctl) - sizeof(u32)))
                        ret = -EFAULT;