Re: [PATCH 2/6] drivers/mfd: drop frees of devm allocated data

2012-09-16 Thread Samuel Ortiz
Hi Julia, On Mon, Aug 13, 2012 at 09:36:06PM +0200, Julia Lawall wrote: > From: Julia Lawall > > devm_kfree should not have to be explicitly used. > devm_regmap_init_i2c also does not require an explicit free. > > The semantic patch that fixes the first problem is as follows: > (http://coccinel

Re: [PATCH 2/6] drivers/mfd: drop frees of devm allocated data

2012-08-13 Thread Julia Lawall
From: Julia Lawall devm_kfree should not have to be explicitly used. devm_regmap_init_i2c also does not require an explicit free. The semantic patch that fixes the first problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,d; @@ x = devm_kzalloc(...) ... ?-devm_kfree(d,x);

Re: [PATCH 2/6] drivers/mfd: drop frees of devm allocated data

2012-08-06 Thread Julia . Lawall
Quoting Dan Carpenter : On Sat, Aug 04, 2012 at 06:50:45PM +0200, Julia Lawall wrote: diff --git a/drivers/mfd/88pm80x.c b/drivers/mfd/88pm80x.c index cd0bf52..2bd090e 100644 --- a/drivers/mfd/88pm80x.c +++ b/drivers/mfd/88pm80x.c @@ -45,17 +45,14 @@ int __devinit pm80x_init(struct i2c_client *

Re: [PATCH 2/6] drivers/mfd: drop frees of devm allocated data

2012-08-06 Thread Dan Carpenter
On Sat, Aug 04, 2012 at 06:50:45PM +0200, Julia Lawall wrote: > diff --git a/drivers/mfd/88pm80x.c b/drivers/mfd/88pm80x.c > index cd0bf52..2bd090e 100644 > --- a/drivers/mfd/88pm80x.c > +++ b/drivers/mfd/88pm80x.c > @@ -45,17 +45,14 @@ int __devinit pm80x_init(struct i2c_client *client, > >

[PATCH 2/6] drivers/mfd: drop frees of devm allocated data

2012-08-04 Thread Julia Lawall
From: Julia Lawall devm_kfree should not have to be explicitly used. devm_regmap_init_i2c also does not require an explicit free. The semantic patch that fixes the first problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,d; @@ x = devm_kzalloc(...) ... ?-devm_kfree(d,x); /