Re: [PATCH] drivers/power/88pm860x_battery.c: eliminate possible references to released resources

2013-01-07 Thread Julia Lawall
On Sun, 6 Jan 2013, Anton Vorontsov wrote: > On Mon, Jan 07, 2013 at 09:42:23AM +0300, Dan Carpenter wrote: > > On Sun, Jan 06, 2013 at 01:16:50PM -0800, Anton Vorontsov wrote: > > > The patch is whitespace-damaged (for some reason there are two spaces in > > > the beginning of each non-change lin

Re: [PATCH] drivers/power/88pm860x_battery.c: eliminate possible references to released resources

2013-01-06 Thread Dan Carpenter
On Sun, Jan 06, 2013 at 10:53:21PM -0800, Anton Vorontsov wrote: > On Mon, Jan 07, 2013 at 09:42:23AM +0300, Dan Carpenter wrote: > > On Sun, Jan 06, 2013 at 01:16:50PM -0800, Anton Vorontsov wrote: > > > The patch is whitespace-damaged (for some reason there are two spaces in > > > the beginning o

Re: [PATCH] drivers/power/88pm860x_battery.c: eliminate possible references to released resources

2013-01-06 Thread Anton Vorontsov
On Mon, Jan 07, 2013 at 09:42:23AM +0300, Dan Carpenter wrote: > On Sun, Jan 06, 2013 at 01:16:50PM -0800, Anton Vorontsov wrote: > > The patch is whitespace-damaged (for some reason there are two spaces in > > the beginning of each non-change line). I repeated changes manually, but > > you might w

Re: [PATCH] drivers/power/88pm860x_battery.c: eliminate possible references to released resources

2013-01-06 Thread Julia Lawall
On Mon, 7 Jan 2013, Dan Carpenter wrote: > On Sun, Jan 06, 2013 at 01:16:50PM -0800, Anton Vorontsov wrote: > > The patch is whitespace-damaged (for some reason there are two spaces in > > the beginning of each non-change line). I repeated changes manually, but > > you might want to fix your mail/

Re: [PATCH] drivers/power/88pm860x_battery.c: eliminate possible references to released resources

2013-01-06 Thread Dan Carpenter
On Sun, Jan 06, 2013 at 01:16:50PM -0800, Anton Vorontsov wrote: > The patch is whitespace-damaged (for some reason there are two spaces in > the beginning of each non-change line). I repeated changes manually, but > you might want to fix your mail/patch setup anyway. :) > It may be something on

Re: [PATCH] drivers/power/88pm860x_battery.c: eliminate possible references to released resources

2013-01-06 Thread Anton Vorontsov
On Sun, Jan 06, 2013 at 09:43:10AM +0100, Julia Lawall wrote: > From: Julia Lawall > > devm_kzalloc should not be followed by kfree, as this results in a double > free. The problem was found using the following semantic match > (http://coccinelle.lip6.fr/): > > // > @@ > expression x,e; > @@ >

[PATCH] drivers/power/88pm860x_battery.c: eliminate possible references to released resources

2013-01-06 Thread Julia Lawall
From: Julia Lawall devm_kzalloc should not be followed by kfree, as this results in a double free. The problem was found using the following semantic match (http://coccinelle.lip6.fr/): // @@ expression x,e; @@ x = devm_kzalloc(...) ... when != x = e ?-kfree(x,...); // Furthermore, in the r