aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorNikanth Karthikesan <knikanth@suse.de>2008-08-04 04:56:07 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-08-06 06:30:03 -0400
commitf7108f91cdcaca07c6a99777b2724093294f36ee (patch)
treed0d7b6ccb1bd6e60c5f48f1ea7c7c420d5a6079b /drivers/block/cciss.c
parent0967d61ea0d8e8a7826bd8949cd93dd1e829ac55 (diff)
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>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 0ce0c279aabf..aeaf465922e5 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,
1134 if (ioc->Request.Type.Direction == XFER_WRITE) { 1134 if (ioc->Request.Type.Direction == XFER_WRITE) {
1135 if (copy_from_user 1135 if (copy_from_user
1136 (buff[sg_used], data_ptr, sz)) { 1136 (buff[sg_used], data_ptr, sz)) {
1137 status = -ENOMEM; 1137 status = -EFAULT;
1138 goto cleanup1; 1138 goto cleanup1;
1139 } 1139 }
1140 } else { 1140 } else {