diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-07-07 18:05:52 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-07-10 15:18:08 +0200 |
commit | 4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6 (patch) | |
tree | 922e22ed49a401848d10392a832e474e16fc60bc /hw/arm | |
parent | 552d7f49eebdb1c84ab6dc7d93bd152fd885af31 (diff) | |
download | qemu-4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6.zip qemu-4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6.tar.gz qemu-4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6.tar.bz2 |
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/arm')
-rw-r--r-- | hw/arm/bcm2835_peripherals.c | 7 | ||||
-rw-r--r-- | hw/arm/bcm2836.c | 7 |
2 files changed, 2 insertions, 12 deletions
diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index 2df8116..beade39 100644 --- a/hw/arm/bcm2835_peripherals.c +++ b/hw/arm/bcm2835_peripherals.c @@ -134,12 +134,7 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp) uint64_t ram_size, vcram_size; int n; - obj = object_property_get_link(OBJECT(dev), "ram", &err); - if (obj == NULL) { - error_setg(errp, "%s: required ram link not found: %s", - __func__, error_get_pretty(err)); - return; - } + obj = object_property_get_link(OBJECT(dev), "ram", &error_abort); ram = MEMORY_REGION(obj); ram_size = memory_region_size(ram); diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 1a7560e..70ca2f0 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -77,12 +77,7 @@ static void bcm2836_realize(DeviceState *dev, Error **errp) /* common peripherals from bcm2835 */ - obj = object_property_get_link(OBJECT(dev), "ram", &err); - if (obj == NULL) { - error_setg(errp, "%s: required ram link not found: %s", - __func__, error_get_pretty(err)); - return; - } + obj = object_property_get_link(OBJECT(dev), "ram", &error_abort); object_property_add_const_link(OBJECT(&s->peripherals), "ram", obj); |