[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.22.394.2005090919460.8@nippy.intranet>
Date: Sat, 9 May 2020 09:28:38 +1000 (AEST)
From: Finn Thain <fthain@...egraphics.com.au>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] net/sonic: Fix some resource leaks in error handling
paths
On Fri, 8 May 2020, Christophe JAILLET wrote:
> A call to 'dma_alloc_coherent()' is hidden in
> 'sonic_alloc_descriptors()'.
>
> This is correctly freed in the remove function, but not in the error
> handling path of the probe function. Fix it and add the missing
> 'dma_free_coherent()' call.
>
> While at it, rename a label in order to be slightly more informative and
> split some too long lines.
>
> This patch is similar to commit 10e3cc180e64 ("net/sonic: Fix a resource
> leak in an error handling path in 'jazz_sonic_probe()'") which was for
> 'jazzsonic.c'.
>
> Suggested-by: Finn Thain <fthain@...egraphics.com.au>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Thanks.
Reviewed-by: Finn Thain <fthain@...egraphics.com.au>
> ---
> Only macsonic has been compile tested. I don't have the needed setup to
> compile xtsonic
I compile tested xtsonic.c. I didn't use an xtensa toolchain as there's
probably no need: the new code already appears elsewhere in that file.
Powered by blists - more mailing lists