On 11 August 2018 at 10:08, Steffen Görtz <cont...@steffen-goertz.de> 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 <cont...@steffen-goertz.de> > --- > 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