aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/xive.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-08-10 18:55:22 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2020-08-13 21:07:28 +1000
commit61203f2b356f8aa7b6cfd3f792cd1f0cc7bdf99b (patch)
tree15c1a12edf35e7d35d2d5abb3d17d87818d2e327 /hw/intc/xive.c
parent6cdc0e20631faf781047b515215208660393c9a9 (diff)
downloadqemu-61203f2b356f8aa7b6cfd3f792cd1f0cc7bdf99b.zip
qemu-61203f2b356f8aa7b6cfd3f792cd1f0cc7bdf99b.tar.gz
qemu-61203f2b356f8aa7b6cfd3f792cd1f0cc7bdf99b.tar.bz2
ppc/xive: Simplify error handling in xive_tctx_realize()
Now that kvmppc_xive_cpu_connect() returns a negative errno on failure, use that and get rid of the local_err boilerplate. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <159707852234.1489912.16410314514265848075.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/xive.c')
-rw-r--r--hw/intc/xive.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index 17ca5a1..489e625 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -662,7 +662,6 @@ static void xive_tctx_realize(DeviceState *dev, Error **errp)
XiveTCTX *tctx = XIVE_TCTX(dev);
PowerPCCPU *cpu;
CPUPPCState *env;
- Error *local_err = NULL;
assert(tctx->cs);
assert(tctx->xptr);
@@ -683,9 +682,7 @@ static void xive_tctx_realize(DeviceState *dev, Error **errp)
/* Connect the presenter to the VCPU (required for CPU hotplug) */
if (xive_in_kernel(tctx->xptr)) {
- kvmppc_xive_cpu_connect(tctx, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ if (kvmppc_xive_cpu_connect(tctx, errp) < 0) {
return;
}
}