summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-08-26 09:02:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-28 10:24:06 +0200
commit3ca121c2f4be85f3fbf398583bc8c42a145e3533 (patch)
tree91fc7e193af4f5b05f1a169e6b2acf4f0efb711f /drivers/staging/lustre/lustre
parent9c8e28df4457e6734237013adb577dbb265df15d (diff)
staging: lustre: obdclass: return -EFAULT if copy_to_user() fails
We recently changed from using obd_ioctl_popdata() to calling copy_to_user() directly. This if statement was supposed to be deleted but it was over looked. "err" is zero at this point so it means we return success. Fixes: b03679f6a41a ("staging: lustre: uapi: remove obd_ioctl_popdata() wrapper") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre')
-rw-r--r--drivers/staging/lustre/lustre/obdclass/class_obd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 57c84e8e1d8e..8ad3adb2ceb1 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -262,7 +262,6 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
dev);
if (copy_to_user((void __user *)arg, data, sizeof(*data)))
- if (err)
err = -EFAULT;
goto out;
}