Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-09-01 Thread walter harms
Grant Likely schrieb: > On Tue, Aug 31, 2010 at 10:16 AM, Vasiliy Kulikov wrote: >> On Tue, Aug 31, 2010 at 18:08 +0200, Julia Lawall wrote: >>> On Tue, 31 Aug 2010, walter harms wrote: > if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && > strncmp(model, "iBook", strle

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-31 Thread walter harms
Julia Lawall schrieb: > Add a call to of_node_put in the error handling code following a call to > of_find_node_by_path. > > The semantic match that finds this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @r exists@ > local idexpression x; > expression E,E1; > statement S; >

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-31 Thread Grant Likely
On Tue, Aug 31, 2010 at 10:16 AM, Vasiliy Kulikov wrote: > On Tue, Aug 31, 2010 at 18:08 +0200, Julia Lawall wrote: >> On Tue, 31 Aug 2010, walter harms wrote: >> > >   if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && >> > >       strncmp(model, "iBook", strlen("iBook")) != 0 && >> > >

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-31 Thread Vasiliy Kulikov
On Tue, Aug 31, 2010 at 18:08 +0200, Julia Lawall wrote: > On Tue, 31 Aug 2010, walter harms wrote: > > > > > > > Julia Lawall schrieb: > > > Add a call to of_node_put in the error handling code following a call to > > > of_find_node_by_path. [...] > > > --- a/drivers/macintosh/via-pmu-led.c > >

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-31 Thread Grant Likely
On Tue, Aug 31, 2010 at 06:08:19PM +0200, Julia Lawall wrote: > On Tue, 31 Aug 2010, walter harms wrote: > > > @@ -92,8 +92,10 @@ static int __init via_pmu_led_init(void) > > > if (dt == NULL) > > > return -ENODEV; > > > model = of_get_property(dt, "model", NULL); > > > - if (model ==

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-31 Thread Julia Lawall
On Tue, 31 Aug 2010, walter harms wrote: > > > Julia Lawall schrieb: > > Add a call to of_node_put in the error handling code following a call to > > of_find_node_by_path. > > > > The semantic match that finds this problem is as follows: > > (http://coccinelle.lip6.fr/) > > > > // > > @r exis

[PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-29 Thread Julia Lawall
Add a call to of_node_put in the error handling code following a call to of_find_node_by_path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_by