diff options
author | Greg Kurz <groug@kaod.org> | 2020-08-10 18:54:47 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-08-13 21:00:52 +1000 |
commit | d55daadcb801f309556fdbab00b2653d20e26603 (patch) | |
tree | 50b86662b68c4cda9688e159b56ed3cc7b7f056b /include/hw/ppc/spapr_xive.h | |
parent | d53482a73bba983f521d6b9652e6f68e856ab794 (diff) |
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>
Diffstat (limited to 'include/hw/ppc/spapr_xive.h')
-rw-r--r-- | include/hw/ppc/spapr_xive.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/ppc/spapr_xive.h b/include/hw/ppc/spapr_xive.h index d0a08b618f..0ffbe0be02 100644 --- a/include/hw/ppc/spapr_xive.h +++ b/include/hw/ppc/spapr_xive.h @@ -80,8 +80,8 @@ int kvmppc_xive_connect(SpaprInterruptController *intc, uint32_t nr_servers, Error **errp); void kvmppc_xive_disconnect(SpaprInterruptController *intc); void kvmppc_xive_reset(SpaprXive *xive, Error **errp); -void kvmppc_xive_set_source_config(SpaprXive *xive, uint32_t lisn, XiveEAS *eas, - Error **errp); +int kvmppc_xive_set_source_config(SpaprXive *xive, uint32_t lisn, XiveEAS *eas, + Error **errp); void kvmppc_xive_sync_source(SpaprXive *xive, uint32_t lisn, Error **errp); uint64_t kvmppc_xive_esb_rw(XiveSource *xsrc, int srcno, uint32_t offset, uint64_t data, bool write); |