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 8eddf206f1edd85f1d9f52912b36d90bc5659fb1..2cd4522462d9a3ca5f17daaf34b42340129d93c3 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);