Browse Source

cciss: return -EFAULT if copy_from_user() fails

Return -EFAULT instead of -ENOMEM if copy_from_user() fails.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Nikanth Karthikesan 17 years ago
parent
commit
f7108f91cd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/block/cciss.c

+ 1 - 1
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 {