Re: [PATCH] clk: boston: fix memory leak of 'onecell' on error return paths

2018-05-16 Thread Dan Carpenter
On Tue, May 15, 2018 at 11:28:40AM -0700, Stephen Boyd wrote: > Quoting Dan Carpenter (2018-05-09 23:59:51) > > It would be nice to make things static check clean. One idea would be > > that the static checker could ignore resource leaks in __init functions. > > > > Typically if the stuff is so

Re: [PATCH] clk: boston: fix memory leak of 'onecell' on error return paths

2018-05-15 Thread Stephen Boyd
Quoting Dan Carpenter (2018-05-09 23:59:51) > It would be nice to make things static check clean. One idea would be > that the static checker could ignore resource leaks in __init functions. > Typically if the stuff is so important that it doesn't work without it then we throw in a panic() or a

Re: [PATCH] clk: boston: fix memory leak of 'onecell' on error return paths

2018-05-10 Thread Dan Carpenter
It would be nice to make things static check clean. One idea would be that the static checker could ignore resource leaks in __init functions. regards, dan carpenter

Re: [PATCH] clk: boston: fix memory leak of 'onecell' on error return paths

2018-05-09 Thread Paul Burton
Hi Colin & Dan, On Wed, May 09, 2018 at 05:01:35PM +0300, Dan Carpenter wrote: > On Wed, May 09, 2018 at 02:40:31PM +0100, Colin King wrote: > > From: Colin Ian King > > > > There are several error return paths that don't free up onecell > > and hence we have some memory leaks. Add an error exit

Re: [PATCH] clk: boston: fix memory leak of 'onecell' on error return paths

2018-05-09 Thread Colin Ian King
On 09/05/18 17:33, Paul Burton wrote: > Hi Colin & Dan, > > On Wed, May 09, 2018 at 05:01:35PM +0300, Dan Carpenter wrote: >> On Wed, May 09, 2018 at 02:40:31PM +0100, Colin King wrote: >>> From: Colin Ian King >>> >>> There are several error return paths that don't free up onecell >>> and hence

Re: [PATCH] clk: boston: fix memory leak of 'onecell' on error return paths

2018-05-09 Thread Dan Carpenter
On Wed, May 09, 2018 at 02:40:31PM +0100, Colin King wrote: > From: Colin Ian King > > There are several error return paths that don't free up onecell > and hence we have some memory leaks. Add an error exit path that > kfree's onecell to fix the leaks. > > Signed-off-by: Colin Ian King > --- >

[PATCH] clk: boston: fix memory leak of 'onecell' on error return paths

2018-05-09 Thread Colin King
From: Colin Ian King There are several error return paths that don't free up onecell and hence we have some memory leaks. Add an error exit path that kfree's onecell to fix the leaks. Signed-off-by: Colin Ian King --- drivers/clk/imgtec/clk-boston.c | 15 +++ 1 file changed, 11 ins