aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-03 17:37:39 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2015-12-04 16:50:59 +1100
commitab8bf1d735133df5b5847bef0b0bea496d614a5a (patch)
tree7eb745ab9fd69d43402003639e0e2b90670d243b
parentc401ae8c9cd4e335dca59661f2849e7a26b5eb31 (diff)
downloadqemu-ab8bf1d735133df5b5847bef0b0bea496d614a5a.tar.gz
qemu-ab8bf1d735133df5b5847bef0b0bea496d614a5a.tar.xz
qemu-ab8bf1d735133df5b5847bef0b0bea496d614a5a.zip
spapr_drc: Change value of property "fdt" from null back to {}
prop_get_fdt() misuses the visitor API: when fdt is null, it doesn't visit anything. object_property_get_qobject() happily object_property_get_qobject(). Amazingly, the latter survives the misuse. Turns out we've papered over it long before prop_get_fdt() existed, in commit 1d10b44. However, commit 6c2f9a1 changed how we paper over it, and as a side effect changed qom-get's value from {} to null. Change it right back by fixing the visitor misuse. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--hw/ppc/spapr_drc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 404fb3c2b..8be62c349 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -259,6 +259,11 @@ static void prop_get_fdt(Object *obj, Visitor *v, void *opaque,
void *fdt;
if (!drc->fdt) {
+ visit_start_struct(v, NULL, NULL, name, 0, &err);
+ if (!err) {
+ visit_end_struct(v, &err);
+ }
+ error_propagate(errp, err);
return;
}