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>
This commit is contained in:
parent
17556cdbe6
commit
bafc56491b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user