From: Nikanth Karthikesan Date: Mon, 4 Aug 2008 08:56:07 +0000 (+0200) Subject: cciss: return -EFAULT if copy_from_user() fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7108f91cdcaca07c6a99777b2724093294f36ee;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 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, if (ioc->Request.Type.Direction == XFER_WRITE) { if (copy_from_user (buff[sg_used], data_ptr, sz)) { - status = -ENOMEM; + status = -EFAULT; goto cleanup1; } } else {