Skip to content

Commit

Permalink
[SCSI] aacraid: Fix return code interpretation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Haverkamp authored and James Bottomley committed Jun 12, 2006
1 parent c5943d3 commit 821499a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 821499a

Please sign in to comment.