[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 5/7] arm: Improve error propagation in nRF51 SOC
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH 5/7] arm: Improve error propagation in nRF51 SOC |
Date: |
Thu, 16 Aug 2018 16:08:52 +0100 |
On 11 August 2018 at 10:08, Steffen Görtz <address@hidden> wrote:
> This patch takes care that errors that occur during
> instantiation of the cortex-m0 cpu are properly propagated.
>
> Signed-off-by: Steffen Görtz <address@hidden>
> ---
> hw/arm/nrf51_soc.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
> index 2265d30352..88a848de8b 100644
> --- a/hw/arm/nrf51_soc.c
> +++ b/hw/arm/nrf51_soc.c
> @@ -66,8 +66,17 @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error
> **errp)
> }
>
> object_property_set_link(OBJECT(&s->cpu), OBJECT(&s->container),
> "memory",
> - &err);
> - object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err);
> + &err);
> + if (err) {
> + error_propagate(errp, err);
> + return;
> + }
> + object_property_set_bool(OBJECT(&s->cpu), true, "realized",
> + &err);
> + if (err) {
> + error_propagate(errp, err);
> + return;
> + }
This should be squashed into the patch which had the bug in it
(one of Joel's, I think).
thanks
-- PMM
- [Qemu-arm] [PATCH 0/7] arm: Instantiation of nRF51 SOC and bbc:microbit devices, Steffen Görtz, 2018/08/11
- [Qemu-arm] [PATCH 4/7] arm: Add additional datasheets and copyright lines, Steffen Görtz, 2018/08/11
- [Qemu-arm] [PATCH 5/7] arm: Improve error propagation in nRF51 SOC, Steffen Görtz, 2018/08/11
- Re: [Qemu-arm] [PATCH 5/7] arm: Improve error propagation in nRF51 SOC,
Peter Maydell <=
- [Qemu-arm] [PATCH 1/7] hw/arm/nrf51_soc: nRF51 Calculate peripheral id from base address, Steffen Görtz, 2018/08/11
- [Qemu-arm] [PATCH 7/7] arm: Instantiate Microbit board-level devices, Steffen Görtz, 2018/08/11
- [Qemu-arm] [PATCH 6/7] arm: Instantiate nRF51 peripherals, Steffen Görtz, 2018/08/11