staging: lustre: Don't ignore error code
authorCristina Moraru <cristina.moraru09@gmail.com>
Sun, 25 Oct 2015 21:16:31 +0000 (23:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 05:35:29 +0000 (14:35 +0900)
Error stored in rc was never reported,
so directly return it here.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/selftest/conctl.c

index 817396638652451c954ba64d70430f1233153c86..556c837cf62cd8f1f0d3f0cd25299f73ebfa2160 100644 (file)
@@ -441,7 +441,7 @@ lst_group_info_ioctl(lstio_group_info_args_t *args)
        if (args->lstio_grp_dentsp != NULL &&
            (copy_to_user(args->lstio_grp_idxp, &index, sizeof(index)) ||
             copy_to_user(args->lstio_grp_ndentp, &ndent, sizeof(ndent))))
-               rc = -EFAULT;
+               return -EFAULT;
 
        return 0;
 }