On 11/18/16 18:57, Bartosz Golaszewski wrote: > 2016-11-02 16:57 GMT+01:00 Jyri Sarha <jsarha@xxxxxx>: >> Use unload to handle initialization failures instead of complex goto >> label mess. To do this the initialization sequence needed slight >> reordering and some unload functions needed to become conditional. >> >> Signed-off-by: Jyri Sarha <jsarha@xxxxxx> >> --- > > I'm not sure yet of the exact error path, but with this patch > tilcdc_crtc_destroy() fails with a NULL-pointer dereference at > dmam_free_coherent() due to crtc->dev being NULL if there are no > panels registered. > Argh, should have read the dmam_alloc_coherent() function documentation. I just wondered what the extra m in function prefix was for and did not realize that it was a devres version of the function (I would have expected such a function to be called devm_dma_alloc_coherent()). Anyway, I'll drop the "drm/tilcdc: Free palette dma memory in tilcdc_crtc_destroy()" patch. Thanks, Jyri _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel