aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-09-14 14:34:54 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2020-10-09 10:15:06 +1100
commita3114923d4c5f0a2ccc8b4d74b3eebad3fb6ce5d (patch)
tree5126eb8d22b2bf87276674187ad3117bcd6a8c5c /hw/ppc
parent899134eb495fe784885cb495bb38e05639cca52a (diff)
spapr: Simplify error handling in callers of ppc_set_compat()
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> Message-Id: <20200914123505.612812-5-groug@kaod.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 544a1947d9..0f82e657e3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3817,10 +3817,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;
}
}