diff options
author | Markus Armbruster | 2020-07-07 18:05:51 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-07-10 15:18:08 +0200 |
commit | 552d7f49eebdb1c84ab6dc7d93bd152fd885af31 (patch) | |
tree | ba2ab90bff80624c63ee6c9bef8440e1e47d48f1 /hw/ppc/spapr_drc.c | |
parent | qom: Rename qdev_get_type() to object_get_type() (diff) | |
download | qemu-552d7f49eebdb1c84ab6dc7d93bd152fd885af31.tar.gz qemu-552d7f49eebdb1c84ab6dc7d93bd152fd885af31.tar.xz qemu-552d7f49eebdb1c84ab6dc7d93bd152fd885af31.zip |
qom: Crash more nicely on object_property_get_link() failure
Pass &error_abort instead of NULL where the returned value is
dereferenced or asserted to be non-null. Drop a now redundant
assertion.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200707160613.848843-24-armbru@redhat.com>
Diffstat (limited to 'hw/ppc/spapr_drc.c')
-rw-r--r-- | hw/ppc/spapr_drc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index d10193f39e..1f18b79348 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -870,7 +870,8 @@ int spapr_dt_drc(void *fdt, int offset, Object *owner, uint32_t drc_type_mask) continue; } - obj = object_property_get_link(root_container, prop->name, NULL); + obj = object_property_get_link(root_container, prop->name, + &error_abort); drc = SPAPR_DR_CONNECTOR(obj); drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); |