lkml.org 
[lkml]   [2012]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] drivers/mfd: drop frees of devm allocated data
Hi Julia,

On Mon, Aug 13, 2012 at 09:36:06PM +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> 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/)
>
> // <smpl>
> @@
> expression x,d;
> @@
>
> x = devm_kzalloc(...)
> ...
> ?-devm_kfree(d,x);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> v2: Removed over-eager optimization of some error-handling code.
>
> drivers/mfd/88pm800.c | 5 +----
> drivers/mfd/88pm80x.c | 19 +++----------------
> 2 files changed, 4 insertions(+), 20 deletions(-)
This one does not apply to my for-next branch, would you please mind rebasing
it against that branch ?

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/


\
 
 \ /
  Last update: 2012-09-17 01:41    [W:0.057 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site