Re: [Qemu-devel] [for-2.10 PATCH] spapr_drc: fix realize and unrealize

2017-08-02 Thread David Gibson
On Wed, Aug 02, 2017 at 10:14:56AM +0200, Greg Kurz wrote: > On Fri, 28 Jul 2017 14:27:45 +1000 > David Gibson wrote: > > > On Thu, Jul 27, 2017 at 03:50:37PM -0500, Michael Roth wrote: > > > Quoting Greg Kurz (2017-07-27 08:45:47) > > > > If object_property_add_alias() returns an error in real

Re: [Qemu-devel] [for-2.10 PATCH] spapr_drc: fix realize and unrealize

2017-08-02 Thread Greg Kurz
On Fri, 28 Jul 2017 14:27:45 +1000 David Gibson wrote: > On Thu, Jul 27, 2017 at 03:50:37PM -0500, Michael Roth wrote: > > Quoting Greg Kurz (2017-07-27 08:45:47) > > > If object_property_add_alias() returns an error in realize(), we should > > > propagate it to the caller and certainly not unr

Re: [Qemu-devel] [for-2.10 PATCH] spapr_drc: fix realize and unrealize

2017-07-28 Thread Greg Kurz
On Thu, 27 Jul 2017 15:50:37 -0500 Michael Roth wrote: > Quoting Greg Kurz (2017-07-27 08:45:47) > > If object_property_add_alias() returns an error in realize(), we should > > propagate it to the caller and certainly not unref the DRC. > > Indeed. I think that was the result of this part of t

Re: [Qemu-devel] [for-2.10 PATCH] spapr_drc: fix realize and unrealize

2017-07-27 Thread David Gibson
On Thu, Jul 27, 2017 at 03:50:37PM -0500, Michael Roth wrote: > Quoting Greg Kurz (2017-07-27 08:45:47) > > If object_property_add_alias() returns an error in realize(), we should > > propagate it to the caller and certainly not unref the DRC. > > Indeed. I think that was the result of this part o

Re: [Qemu-devel] [for-2.10 PATCH] spapr_drc: fix realize and unrealize

2017-07-27 Thread Michael Roth
Quoting Greg Kurz (2017-07-27 08:45:47) > If object_property_add_alias() returns an error in realize(), we should > propagate it to the caller and certainly not unref the DRC. Indeed. I think that was the result of this part of the code originally living in spapr_dr_connector_new() during developm

[Qemu-devel] [for-2.10 PATCH] spapr_drc: fix realize and unrealize

2017-07-27 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