Commit 821499a8 authored by Mark Haverkamp's avatar Mark Haverkamp Committed by James Bottomley

[SCSI] aacraid: Fix return code interpretation

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: default avatarMark Haverkamp <markh@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent c5943d36
...@@ -564,7 +564,7 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long ...@@ -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)); f = compat_alloc_user_space(sizeof(*f));
ret = 0; ret = 0;
if (clear_user(f, sizeof(*f)) != sizeof(*f)) if (clear_user(f, sizeof(*f)))
ret = -EFAULT; ret = -EFAULT;
if (copy_in_user(f, (void __user *)arg, sizeof(struct fib_ioctl) - sizeof(u32))) if (copy_in_user(f, (void __user *)arg, sizeof(struct fib_ioctl) - sizeof(u32)))
ret = -EFAULT; ret = -EFAULT;
......
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