21:52 TimurTabi: I'm a little confused about the _fini functions in Nouveau. I thought that "fini" stands for "finish init" or something like that. That is, they are called at the end of the init for that subdev. However, I see that nouveau_drm_device_remove() calls nouveau_drm_device_fini(), which tells me that nouveau_drm_device_fini() is for removing the drm, not finishing its initialization.
22:02 ajax: it's more like "finish" full stop
22:03 ajax: it's just truncated to make it match "init" in length
23:39 karolherbst: TimurTabi: mhhh, sounds like it could potentially leak stuff
23:40 TimurTabi: I suspect that if ini fails, then it unwraps all allocations anyway, so there's nothing to "finish" when the driver unloads.
23:44 karolherbst: potentially
23:45 karolherbst: error handling is such a broken mess in C sadly, so everybody is doing it slightly different. But I think the "normal" way is to deal with errors inside init and clean it up instead of making fini deal with random state