* [PATCH] power: 88pm860x: fix invalid free of devm_* allocated data
@ 2013-03-17 6:18 Silviu-Mihai Popescu
2013-04-01 6:36 ` Anton Vorontsov
0 siblings, 1 reply; 2+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-17 6:18 UTC (permalink / raw)
To: linux-kernel; +Cc: cbou, dwmw2, Silviu-Mihai Popescu
The objects allocated by devm_* APIs are managed by devres and are freed
when the device is detached. There is no need to use kfree() explicitly.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
drivers/power/88pm860x_charger.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/power/88pm860x_charger.c b/drivers/power/88pm860x_charger.c
index 4b37a5a..d7ceeac 100644
--- a/drivers/power/88pm860x_charger.c
+++ b/drivers/power/88pm860x_charger.c
@@ -714,7 +714,6 @@ out_irq:
while (--i >= 0)
free_irq(info->irq[i], info);
out:
- kfree(info);
return ret;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] power: 88pm860x: fix invalid free of devm_* allocated data
2013-03-17 6:18 [PATCH] power: 88pm860x: fix invalid free of devm_* allocated data Silviu-Mihai Popescu
@ 2013-04-01 6:36 ` Anton Vorontsov
0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2013-04-01 6:36 UTC (permalink / raw)
To: Silviu-Mihai Popescu; +Cc: linux-kernel, dwmw2
On Sun, Mar 17, 2013 at 08:18:43AM +0200, Silviu-Mihai Popescu wrote:
> The objects allocated by devm_* APIs are managed by devres and are freed
> when the device is detached. There is no need to use kfree() explicitly.
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
> ---
Jingoo Han sent a similar patch earlier...
Anyway, thanks!
Anton
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-01 6:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-17 6:18 [PATCH] power: 88pm860x: fix invalid free of devm_* allocated data Silviu-Mihai Popescu
2013-04-01 6:36 ` Anton Vorontsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).