spapr_drc: abort if object_property_add_child() fails
commit325837ca3851d7e6761649a44ea3c111e2e1757f
authorGreg Kurz <groug@kaod.org>
Mon, 7 Aug 2017 17:24:39 +0000 (7 19:24 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 9 Aug 2017 01:46:44 +0000 (9 11:46 +1000)
treea297d9c5b81df70260c68967ac7c812554e1c9b2
parentb8af5b2d5f67b0e1b274f8532f42a47bfe46ea3b
spapr_drc: abort if object_property_add_child() fails

object_property_add_child() can only fail in two cases:
- the child already has a parent, which shouldn't happen since the DRC was
  allocated a few lines above
- the parent already has a child with the same name, which would mean the
  caller tries to create a DRC that already exists

In both case, this is a QEMU bug and we should abort.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_drc.c