diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-07-07 18:06:04 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-07-10 15:18:08 +0200 |
commit | 992861fb1e4cf410f30ec8f05bd2dc2a14a5a027 (patch) | |
tree | 9d4d5de47d4ebae50838cd7f8ea39b89a3604507 /hw/ppc | |
parent | af175e85f92c870386ad74f466e29537b79611d3 (diff) | |
download | qemu-992861fb1e4cf410f30ec8f05bd2dc2a14a5a027.zip qemu-992861fb1e4cf410f30ec8f05bd2dc2a14a5a027.tar.gz qemu-992861fb1e4cf410f30ec8f05bd2dc2a14a5a027.tar.bz2 |
error: Eliminate error_propagate() manually
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away. The previous two commits did that for sufficiently simple
cases with Coccinelle. Do it for several more manually.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-37-armbru@redhat.com>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr_cpu_core.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 85330d0..c4f47dc 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -239,8 +239,8 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, CPUState *cs = CPU(cpu); Error *local_err = NULL; - if (!qdev_realize(DEVICE(cpu), NULL, &local_err)) { - goto error; + if (!qdev_realize(DEVICE(cpu), NULL, errp)) { + return; } /* Set time-base frequency to 512 MHz */ @@ -250,20 +250,14 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, kvmppc_set_papr(cpu); if (spapr_irq_cpu_intc_create(spapr, cpu, &local_err) < 0) { - goto error_intc_create; + cpu_remove_sync(CPU(cpu)); + return; } if (!sc->pre_3_0_migration) { vmstate_register(NULL, cs->cpu_index, &vmstate_spapr_cpu_state, cpu->machine_data); } - - return; - -error_intc_create: - cpu_remove_sync(CPU(cpu)); -error: - error_propagate(errp, local_err); } static PowerPCCPU *spapr_create_vcpu(SpaprCpuCore *sc, int i, Error **errp) |