[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCHv3 2/7] pnv: Fix some error handling cpu realize()
From: |
Greg Kurz |
Subject: |
Re: [Qemu-ppc] [PATCHv3 2/7] pnv: Fix some error handling cpu realize() |
Date: |
Thu, 14 Jun 2018 08:35:52 +0200 |
On Thu, 14 Jun 2018 14:41:24 +1000
David Gibson <address@hidden> wrote:
> In pnv_core_realize() we call two functions with an Error * parameter in
> succession, which will go badly if they both cause errors. In fact, a
> failure in either of them indicates a qemu internal error, so we can just
> use &error_abort in both cases.
>
> Signed-off-by: David Gibson <address@hidden>
> ---
Reviewed-by: Greg Kurz <address@hidden>
> hw/ppc/pnv_core.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
> index 13ad7d9e04..01f47c8037 100644
> --- a/hw/ppc/pnv_core.c
> +++ b/hw/ppc/pnv_core.c
> @@ -172,12 +172,9 @@ static void pnv_core_realize(DeviceState *dev, Error
> **errp)
> object_initialize(obj, size, typename);
>
> snprintf(name, sizeof(name), "thread[%d]", i);
> - object_property_add_child(OBJECT(pc), name, obj, &local_err);
> + object_property_add_child(OBJECT(pc), name, obj, &error_abort);
> object_property_add_alias(obj, "core-pir", OBJECT(pc),
> - "pir", &local_err);
> - if (local_err) {
> - goto err;
> - }
> + "pir", &error_abort);
> object_unref(obj);
> }
>
- [Qemu-ppc] [PATCHv3 0/7] Better handling of machine specific per-cpu information, David Gibson, 2018/06/14
- [Qemu-ppc] [PATCHv3 2/7] pnv: Fix some error handling cpu realize(), David Gibson, 2018/06/14
- [Qemu-ppc] [PATCHv3 3/7] pnv_core: Allocate cpu thread objects individually, David Gibson, 2018/06/14
- [Qemu-ppc] [PATCHv3 1/7] spapr: Clean up cpu realize/unrealize paths, David Gibson, 2018/06/14
- [Qemu-ppc] [PATCHv3 6/7] target/ppc: Replace intc pointer with a general machine_data pointer, David Gibson, 2018/06/14
- [Qemu-ppc] [PATCHv3 5/7] pnv: Add cpu unrealize path, David Gibson, 2018/06/14
- [Qemu-ppc] [PATCHv3 4/7] pnv: Clean up cpu realize path, David Gibson, 2018/06/14