aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/selftest/conctl.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-02-23 09:09:33 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-27 14:45:10 +0100
commitbafc56491bf3ec090994fc3a2451ec3c68d5bc1b (patch)
tree66000123349544d3d947ade3faf19f5fb6fa5798 /drivers/staging/lustre/lnet/selftest/conctl.c
parentstaging: lustre: lmv: correctly iput lmo_root (diff)
downloadlinux-dev-bafc56491bf3ec090994fc3a2451ec3c68d5bc1b.tar.xz
linux-dev-bafc56491bf3ec090994fc3a2451ec3c68d5bc1b.zip
staging: lustre: lnet/selftest: don't ignore status from lstcon_test_add
If lstcon_test_add sets 'ret' (passed by reference) to 1, then lst_test_add_ioctl() ignores the return value. This isn't justified - the return value must be zero for 'ret' to be meaningful. Signed-off-by: NeilBrown <neilb@suse.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/staging/lustre/lnet/selftest/conctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c b/drivers/staging/lustre/lnet/selftest/conctl.c
index 51497cf9a832..a2d8092bdeb7 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -670,7 +670,7 @@ static int lst_test_add_ioctl(struct lstio_test_args *args)
args->lstio_tes_param_len,
&ret, args->lstio_tes_resultp);
- if (ret)
+ if (!rc && ret)
rc = (copy_to_user(args->lstio_tes_retp, &ret,
sizeof(ret))) ? -EFAULT : 0;
out: