On Thu, 20 Feb 2020 at 16:01, Cornelia Huck <coh...@redhat.com> wrote: > I may be missing something, but what cleans up the timers if we fail > further down in this function? I don't think the unrealize callback is > invoked by the core in case of error?
FWIW I sent a mail to one of these threads a few days ago where I claimed we did call unrealize if realize fails, but looking again at the device_set_realized() code I think I was misreading it. If the device's own 'realize' method fails, we go to the 'fail' label, which just reports back the error and doesn't call unrealize. It's only if the device's 'realize' method succeeds and we get a failure in some later thing like calling 'realize' on the child bus objects that we will call the device unrealize as part of cleanup. Apologies for any confusion caused. thanks -- PMM