[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 37/40] ppc/xive: Simplify error handling in xive_tctx_realize()
From: |
David Gibson |
Subject: |
[PULL 37/40] ppc/xive: Simplify error handling in xive_tctx_realize() |
Date: |
Tue, 18 Aug 2020 14:19:19 +1000 |
From: Greg Kurz <groug@kaod.org>
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>
---
hw/intc/xive.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index 17ca5a1916..489e6256ef 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;
}
}
--
2.26.2
- [PULL 22/40] ppc/xive: Rework setup of XiveSource::esb_mmio, (continued)
- [PULL 22/40] ppc/xive: Rework setup of XiveSource::esb_mmio, David Gibson, 2020/08/18
- [PULL 23/40] ppc/xive: Introduce dedicated kvm_irqchip_in_kernel() wrappers, David Gibson, 2020/08/18
- [PULL 20/40] spapr/xive: Simplify kvmppc_xive_disconnect(), David Gibson, 2020/08/18
- [PULL 21/40] target/ppc: Integrate icount to purr, vtb, and tbu40, David Gibson, 2020/08/18
- [PULL 24/40] spapr/xive: Convert KVM device fd checks to assert(), David Gibson, 2020/08/18
- [PULL 27/40] spapr/xive: Rework error handling of kvmppc_xive_source_reset(), David Gibson, 2020/08/18
- [PULL 26/40] spapr/xive: Rework error handling of kvmppc_xive_cpu_connect(), David Gibson, 2020/08/18
- [PULL 25/40] spapr: Simplify error handling in spapr_phb_realize(), David Gibson, 2020/08/18
- [PULL 29/40] spapr/xive: Rework error handling of kvmppc_xive_cpu_[gs]et_state(), David Gibson, 2020/08/18
- [PULL 28/40] spapr/xive: Rework error handling of kvmppc_xive_mmap(), David Gibson, 2020/08/18
- [PULL 37/40] ppc/xive: Simplify error handling in xive_tctx_realize(),
David Gibson <=
- [PULL 30/40] spapr/xive: Rework error handling of kvmppc_xive_[gs]et_queue_config(), David Gibson, 2020/08/18
- [PULL 31/40] spapr/xive: Rework error handling in kvmppc_xive_get_queues(), David Gibson, 2020/08/18
- [PULL 39/40] nvram: Exit QEMU if NVRAM cannot contain all -prom-env data, David Gibson, 2020/08/18
- [PULL 33/40] spapr/kvm: Fix error handling in kvmppc_xive_pre_save(), David Gibson, 2020/08/18
- [PULL 36/40] spapr/xive: Simplify error handling in kvmppc_xive_connect(), David Gibson, 2020/08/18
- [PULL 38/40] spapr/xive: Simplify error handling of kvmppc_xive_cpu_synchronize_state(), David Gibson, 2020/08/18
- [PULL 32/40] spapr/xive: Rework error handling of kvmppc_xive_set_source_config(), David Gibson, 2020/08/18
- [PULL 35/40] ppc/xive: Fix error handling in vmstate_xive_tctx_*() callbacks, David Gibson, 2020/08/18
- [PULL 34/40] spapr/xive: Fix error handling in kvmppc_xive_post_load(), David Gibson, 2020/08/18
- [PULL 40/40] spapr/xive: Use xive_source_esb_len(), David Gibson, 2020/08/18