On 26/01/17 22:21, Peter Maydell wrote:
> On 26 January 2017 at 20:47, Peter Maydell <peter.mayd...@linaro.org> wrote:
>> On 26 January 2017 at 19:36, Stefano Stabellini <sstabell...@kernel.org> 
>> wrote:
>>> It should be just a matter of replacing qdev_init_nofail with something
>>> that can fail. I couldn't find a regular qdev_init that can return
>>> error, so maybe we would need to add it.
>>
>> That's just
>>     object_property_set_bool(OBJECT(whatever), true, "realized", &err);
>>
>> ie "please realize the device".
> 
> (PS watch out for ownership refcounting issues depending on what
> you did with parenting the device: you likely want to object_unparent()
> and then object_unref() the thing in the error-exit path. See
> qdev_device_add() for some example code, maybe.)

I'll have a try later today or early next week.


Juergen


Reply via email to