提交 ab8bf1d7 编写于 作者: M Markus Armbruster 提交者: David Gibson

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 1d10b445.

However, commit 6c2f9a15 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: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
上级 c401ae8c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册