Skip to content

Commit

Permalink
spapr_drc: Change value of property "fdt" from null back to {}
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Armbruster authored and dgibson committed Dec 4, 2015
1 parent c401ae8 commit ab8bf1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hw/ppc/spapr_drc.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit ab8bf1d

Please sign in to comment.