staging: lustre: simple cleanup in obd_ioctl_popdata
authorLiang Zhen <liang.zhen@intel.com>
Tue, 22 Mar 2016 23:03:59 +0000 (19:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
Code simplification for obd_ioctl_popdata.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c

index 8eddf20..2cd4522 100644 (file)
@@ -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);