summaryrefslogtreecommitdiffstats
path: root/hw/dma/bcm2835_dma.c
diff options
context:
space:
mode:
authorMarkus Armbruster2020-07-07 18:05:52 +0200
committerMarkus Armbruster2020-07-10 15:18:08 +0200
commit4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6 (patch)
tree922e22ed49a401848d10392a832e474e16fc60bc /hw/dma/bcm2835_dma.c
parentqom: Crash more nicely on object_property_get_link() failure (diff)
downloadqemu-4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6.tar.gz
qemu-4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6.tar.xz
qemu-4d21fcd52404ff4bac1f94d8054dfb745f1b2ad6.zip
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/dma/bcm2835_dma.c')
-rw-r--r--hw/dma/bcm2835_dma.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c
index 4cd9dab745..eb0002a2b9 100644
--- a/hw/dma/bcm2835_dma.c
+++ b/hw/dma/bcm2835_dma.c
@@ -376,16 +376,9 @@ static void bcm2835_dma_reset(DeviceState *dev)
static void bcm2835_dma_realize(DeviceState *dev, Error **errp)
{
BCM2835DMAState *s = BCM2835_DMA(dev);
- Error *err = NULL;
Object *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_DMA "-memory");