[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-5.1 v2 32/54] hw/arm/armv7m: Add missing error-propagation co
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-5.1 v2 32/54] hw/arm/armv7m: Add missing error-propagation code |
Date: |
Mon, 6 Apr 2020 19:47:21 +0200 |
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>
---
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH-for-5.1 v2 32/54] hw/arm/armv7m: Add missing error-propagation code,
Philippe Mathieu-Daudé <=