[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.1 v3 08/23] hw/arm/armv7m: Add missing error-propagatio
From: |
Alistair Francis |
Subject: |
Re: [PATCH-for-5.1 v3 08/23] hw/arm/armv7m: Add missing error-propagation code |
Date: |
Mon, 13 Apr 2020 15:10:38 -0700 |
On Sun, Apr 12, 2020 at 3:54 PM Philippe Mathieu-Daudé <address@hidden> wrote:
>
> Patch created mechanically by running:
>
> $ spatch \
> --macro-file scripts/cocci-macro-file.h --include-headers \
> --sp-file scripts/coccinelle/use-error_propagate-in-realize.cocci \
> --keep-comments --smpl-spacing --in-place --dir hw
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> hw/arm/armv7m.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
> index 7531b97ccd..249a7605f6 100644
> --- a/hw/arm/armv7m.c
> +++ b/hw/arm/armv7m.c
> @@ -168,7 +168,11 @@ static void armv7m_realize(DeviceState *dev, Error
> **errp)
> }
>
> object_property_set_link(OBJECT(s->cpu), OBJECT(&s->container), "memory",
> - &error_abort);
> + &err);
> + if (err) {
> + error_propagate(errp, err);
> + return;
> + }
> if (object_property_find(OBJECT(s->cpu), "idau", NULL)) {
> object_property_set_link(OBJECT(s->cpu), s->idau, "idau", &err);
> if (err != NULL) {
> @@ -256,7 +260,11 @@ static void armv7m_realize(DeviceState *dev, Error
> **errp)
> return;
> }
> object_property_set_link(obj, OBJECT(s->board_memory),
> - "source-memory", &error_abort);
> + "source-memory", &err);
> + if (err) {
> + error_propagate(errp, err);
> + return;
> + }
> object_property_set_bool(obj, true, "realized", &err);
> if (err != NULL) {
> error_propagate(errp, err);
> --
> 2.21.1
>
>
- Re: [PATCH-for-5.1 v3 01/23] scripts/coccinelle: Catch missing error_propagate() calls in realize(), (continued)
- [PATCH-for-5.1 v3 02/23] hw/arm/fsl-imx: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 03/23] hw/arm/stm32f*05_soc: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 05/23] hw/arm/allwinner-a10: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 04/23] hw/arm/aspeed: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 06/23] hw/arm/msf2-soc: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 07/23] hw/riscv/sifive: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 08/23] hw/arm/armv7m: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- Re: [PATCH-for-5.1 v3 08/23] hw/arm/armv7m: Add missing error-propagation code,
Alistair Francis <=
- [PATCH-for-5.1 v3 09/23] hw/intc/arm_gicv3_its_kvm: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 11/23] hw/pci-host/pnv_phb3: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 10/23] hw/microblaze/xlnx-zynqmp-pmu: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 12/23] hw/block/onenand: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 13/23] scripts/coccinelle: Add script to catch missing error_propagate() calls, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 14/23] hw/arm/bcm2835_peripherals: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 15/23] hw/arm/fsl-imx: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 16/23] hw/arm/stm32fx05_soc: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12