@@ -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);
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é <f4bug@amsat.org> --- hw/arm/armv7m.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)