Re: [Qemu-devel] [for-2.11 PATCH 07/26] spapr_drc: fix realize and unrealize

2017-07-26 Thread David Gibson
On Wed, Jul 26, 2017 at 11:36:43AM +0200, Greg Kurz wrote: > On Wed, 26 Jul 2017 14:04:59 +1000 > David Gibson wrote: > > > On Tue, Jul 25, 2017 at 07:59:31PM +0200, Greg Kurz wrote: > > > If object_property_add_alias() returns an error in realize(), we should > > > propagate it to the caller and

Re: [Qemu-devel] [for-2.11 PATCH 07/26] spapr_drc: fix realize and unrealize

2017-07-26 Thread Greg Kurz
On Wed, 26 Jul 2017 14:04:59 +1000 David Gibson wrote: > On Tue, Jul 25, 2017 at 07:59:31PM +0200, Greg Kurz wrote: > > 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().

Re: [Qemu-devel] [for-2.11 PATCH 07/26] spapr_drc: fix realize and unrealize

2017-07-25 Thread David Gibson
On Tue, Jul 25, 2017 at 07:59:31PM +0200, Greg Kurz wrote: > 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 ri

[Qemu-devel] [for-2.11 PATCH 07/26] spapr_drc: fix realize and unrealize

2017-07-25 Thread Greg Kurz
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