[Nouveau] [PATCH] drm: sgdma: free allocated memory if TT init fails

Alexandre Courbot acourbot at nvidia.com
Wed Dec 10 10:58:10 PST 2014


On 12/11/2014 03:47 AM, Ilia Mirkin wrote:
> We get this patch every few months... How about one that instead adds
> a comment which explains why this kfree isn't needed :) [I'm leaving
> the reason to the reader, which will force you to glance at the ttm
> code.]

ttm_dma_tt_init -> ttm_tt_destroy -> nouveau_sgdma_destroy -> kfree

Urrk.

I'm definitely not a fan of things happening this way, but let it be.

Indeed a comment would be nice to have here, let me prep a patch for 
this instead...


More information about the Nouveau mailing list