aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Zhen <[email protected]>2016-03-22 19:03:59 -0400
committerGreg Kroah-Hartman <[email protected]>2016-03-28 07:30:36 -0700
commita0d5fce76d69f574df1577d20dc3b25f99031167 (patch)
tree67e10baa90f63492bca0ede01e7259e34b72816f
parentda4e5898375a100e6c1be984ceee84fb5911b6f6 (diff)
staging: lustre: simple cleanup in obd_ioctl_popdata
Code simplification for obd_ioctl_popdata. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/lustre/lustre/obdclass/linux/linux-module.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 8eddf206f1ed..2cd4522462d9 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -158,9 +158,7 @@ int obd_ioctl_popdata(void __user *arg, void *data, int len)
{
int err;
- err = copy_to_user(arg, data, len);
- if (err)
- err = -EFAULT;
+ err = copy_to_user(arg, data, len) ? -EFAULT : 0;
return err;
}
EXPORT_SYMBOL(obd_ioctl_popdata);