aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:05:52 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:18:08 +0200
commit4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6 (patch)
tree922e22ed49a401848d10392a832e474e16fc60bc /hw/misc
parent552d7f49eebdb1c84ab6dc7d93bd152fd885af31 (diff)
qom: Don't handle impossible object_property_get_link() failure
Don't handle object_property_get_link() failure that can't happen unless the programmer screwed up, pass &error_abort. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200707160613.848843-25-armbru@redhat.com>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/bcm2835_mbox.c9
-rw-r--r--hw/misc/bcm2835_property.c17
2 files changed, 3 insertions, 23 deletions
diff --git a/hw/misc/bcm2835_mbox.c b/hw/misc/bcm2835_mbox.c
index 2afa06a746..9f73cbd5e4 100644
--- a/hw/misc/bcm2835_mbox.c
+++ b/hw/misc/bcm2835_mbox.c
@@ -308,15 +308,8 @@ static void bcm2835_mbox_realize(DeviceState *dev, Error **errp)
{
BCM2835MboxState *s = BCM2835_MBOX(dev);
Object *obj;
- Error *err = NULL;
-
- obj = object_property_get_link(OBJECT(dev), "mbox-mr", &err);
- if (obj == NULL) {
- error_setg(errp, "%s: required mbox-mr link not found: %s",
- __func__, error_get_pretty(err));
- return;
- }
+ obj = object_property_get_link(OBJECT(dev), "mbox-mr", &error_abort);
s->mbox_mr = MEMORY_REGION(obj);
address_space_init(&s->mbox_as, s->mbox_mr, TYPE_BCM2835_MBOX "-memory");
bcm2835_mbox_reset(dev);
diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c
index 3e228ca0ae..73941bdae9 100644
--- a/hw/misc/bcm2835_property.c
+++ b/hw/misc/bcm2835_property.c
@@ -392,24 +392,11 @@ static void bcm2835_property_realize(DeviceState *dev, Error **errp)
{
BCM2835PropertyState *s = BCM2835_PROPERTY(dev);
Object *obj;
- Error *err = NULL;
-
- obj = object_property_get_link(OBJECT(dev), "fb", &err);
- if (obj == NULL) {
- error_setg(errp, "%s: required fb link not found: %s",
- __func__, error_get_pretty(err));
- return;
- }
+ obj = object_property_get_link(OBJECT(dev), "fb", &error_abort);
s->fbdev = BCM2835_FB(obj);
- obj = object_property_get_link(OBJECT(dev), "dma-mr", &err);
- if (obj == NULL) {
- error_setg(errp, "%s: required dma-mr link not found: %s",
- __func__, error_get_pretty(err));
- return;
- }
-
+ obj = object_property_get_link(OBJECT(dev), "dma-mr", &error_abort);
s->dma_mr = MEMORY_REGION(obj);
address_space_init(&s->dma_as, s->dma_mr, TYPE_BCM2835_PROPERTY "-memory");