spapr_pci: handle FDT creation errors with _FDT()
commit9ba255365e19db6cce8ad6d03bc02db96c429641
authorGreg Kurz <groug@kaod.org>
Sat, 9 Sep 2017 15:06:33 +0000 (9 17:06 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 15 Sep 2017 00:29:48 +0000 (15 10:29 +1000)
tree4e190b2c63b066b7145611016cd9787ba823e34e
parent99372e785efe9fe6a4e30cab4e33b79b227dc28d
spapr_pci: handle FDT creation errors with _FDT()

libfdt failures when creating the FDT should cause QEMU to terminate.

Let's use the _FDT() macro which does just that instead of propagating
the error to the caller. spapr_populate_pci_child_dt() no longer needs
to return a value in this case.

Note that, on the way, this get rids of the following nonsensical lines:

    g_assert(!ret);
    if (ret) {

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