spapr/xive: Rework error handling of kvmppc_xive_set_source_config()
commitd55daadcb801f309556fdbab00b2653d20e26603
authorGreg Kurz <groug@kaod.org>
Mon, 10 Aug 2020 16:54:47 +0000 (10 18:54 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 13 Aug 2020 11:00:52 +0000 (13 21:00 +1000)
tree50b86662b68c4cda9688e159b56ed3cc7b7f056b
parentd53482a73bba983f521d6b9652e6f68e856ab794
spapr/xive: Rework error handling of kvmppc_xive_set_source_config()

Since kvm_device_access() returns a negative errno on failure, convert
kvmppc_xive_set_source_config() to use it for error checking. This allows
to get rid of the local_err boilerplate.

Propagate the return value so that callers may use it as well to check
failures.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159707848764.1489912.17078842252160674523.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive_kvm.c
include/hw/ppc/spapr_xive.h