x86/mmuext: unify okay/rc error handling in do_mmuext_op()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 22 Dec 2015 09:10:44 +0000 (10:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 22 Dec 2015 09:10:44 +0000 (10:10 +0100)
commit0d82868e1f45a4219954433a24f86004308f5c57
tree5d50b98b40a8b1259ac4fa9a31d3ad8c82f3e674
parentbf925a9f1254391749f569c1b8fc606036340488
x86/mmuext: unify okay/rc error handling in do_mmuext_op()

c/s 506db90 "x86/HVM: merge HVM and PVH hypercall tables" introduced a path
whereby 'okay' was used uninitialised, with broke compilation on CentOS 7.

Splitting the error handling like this is fragile and unnecessary.  Drop the
okay variable entirely and just use rc directly, substituting rc = -EINVAL/0
for okay = 0/1.

In addition, two error messages are updated to print rc, and some stray
whitespace is dropped.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Make setting of rc happen consistently after MEM_LOG(), if that is being
used.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c