spapr_drc: fix realize and unrealize
commitbf26ae32a92a8446bd9db569f9cdb53cc272aaad
authorGreg Kurz <groug@kaod.org>
Thu, 27 Jul 2017 13:45:47 +0000 (27 15:45 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 29 Jul 2017 06:22:14 +0000 (29 16:22 +1000)
treed0344b29c9e52b7c14b631224a0600ec7f28cde0
parenta588c4985eff363154d65aee8607d0a4601655f7
spapr_drc: fix realize and unrealize

If object_property_add_alias() returns an error in realize(), we should
propagate it to the caller and certainly not unref the DRC.

Same thing goes for unrealize(). Since object_property_del() is the last
call, we can even get rid of the intermediate Error *.

And finally, unrealize() should undo all registrations performed by
realize().

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