From: Nikanth Karthikesan Date: Mon, 4 Aug 2008 08:56:07 +0000 (+0200) Subject: cciss: return -EFAULT if copy_from_user() fails X-Git-Tag: v2.6.27-rc3~74^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f7108f91cdcaca07c6a99777b2724093294f36ee;p=linux-2.6-omap-h63xx.git cciss: return -EFAULT if copy_from_user() fails Return -EFAULT instead of -ENOMEM if copy_from_user() fails. Signed-off-by: Nikanth Karthikesan Acked-by: Mike Miller Signed-off-by: Jens Axboe --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 0ce0c279aab..aeaf465922e 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1134,7 +1134,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, if (ioc->Request.Type.Direction == XFER_WRITE) { if (copy_from_user (buff[sg_used], data_ptr, sz)) { - status = -ENOMEM; + status = -EFAULT; goto cleanup1; } } else {