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

Ben Skeggs skeggsb at gmail.com
Wed Dec 10 14:07:24 PST 2014


On Thu, Dec 11, 2014 at 4:58 AM, Alexandre Courbot <acourbot at nvidia.com> wrote:
> 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.]
I'd quite like it if people looked at a bit more context for sending
such patches......

>
>
> ttm_dma_tt_init -> ttm_tt_destroy -> nouveau_sgdma_destroy -> kfree
>
> Urrk.
..... That said..  I made the same mistake myself a few years back ;)

>
> 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...
I've picked up all three patches.

Thanks,
Ben.

>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list