[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/15] spapr: Simplify error handling in callers of ppc_set_compa
From: |
Greg Kurz |
Subject: |
[PATCH 04/15] spapr: Simplify error handling in callers of ppc_set_compat() |
Date: |
Mon, 14 Sep 2020 14:34:54 +0200 |
Now that ppc_set_compat() indicates success/failure with a return
value, use it and reduce error propagation overhead.
Signed-off-by: Greg Kurz <groug@kaod.org>
---
hw/ppc/spapr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ea2c755310cd..c0a3f5f26d97 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3820,10 +3820,9 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev,
DeviceState *dev,
*/
if (hotplugged) {
for (i = 0; i < cc->nr_threads; i++) {
- ppc_set_compat(core->threads[i],
POWERPC_CPU(first_cpu)->compat_pvr,
- &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ if (ppc_set_compat(core->threads[i],
+ POWERPC_CPU(first_cpu)->compat_pvr,
+ errp) < 0) {
return;
}
}
--
2.26.2
- [PATCH 00/15] spapr: Error handling fixes and cleanups (round 2), Greg Kurz, 2020/09/14
- [PATCH 01/15] spapr: Fix error leak in spapr_realize_vcpu(), Greg Kurz, 2020/09/14
- [PATCH 02/15] ppc: Add a return value to ppc_set_compat() and ppc_set_compat_all(), Greg Kurz, 2020/09/14
- [PATCH 04/15] spapr: Simplify error handling in callers of ppc_set_compat(),
Greg Kurz <=
- [PATCH 03/15] ppc: Fix return value in cpu_post_load() error path, Greg Kurz, 2020/09/14
- [PATCH 05/15] spapr: Get rid of cas_check_pvr() error reporting, Greg Kurz, 2020/09/14
- [PATCH 07/15] spapr: Simplify error handling in spapr_vio_busdev_realize(), Greg Kurz, 2020/09/14