* [PATCH] mfd: ab8500-core: Fix invalid free of devm_ allocated data
@ 2012-11-23 12:18 Tushar Behera
2012-11-28 15:48 ` Linus Walleij
2012-11-30 10:52 ` Samuel Ortiz
0 siblings, 2 replies; 3+ messages in thread
From: Tushar Behera @ 2012-11-23 12:18 UTC (permalink / raw)
To: linux-arm-kernel
The objects allocated by devm_* APIs are managed by devres and are
freed when the device is detached. Hence there is no need to remove
them explicitly in remove function.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
drivers/mfd/ab8500-core.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 148d2ee..af7a6ba 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -1428,11 +1428,6 @@ static int __devexit ab8500_remove(struct platform_device *pdev)
sysfs_remove_group(&ab8500->dev->kobj, &ab8500_attr_group);
mfd_remove_devices(ab8500->dev);
- free_irq(ab8500->irq, ab8500);
-
- kfree(ab8500->oldmask);
- kfree(ab8500->mask);
- kfree(ab8500);
return 0;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] mfd: ab8500-core: Fix invalid free of devm_ allocated data
2012-11-23 12:18 [PATCH] mfd: ab8500-core: Fix invalid free of devm_ allocated data Tushar Behera
@ 2012-11-28 15:48 ` Linus Walleij
2012-11-30 10:52 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-11-28 15:48 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 23, 2012 at 1:18 PM, Tushar Behera <tushar.behera@linaro.org> wrote:
> The objects allocated by devm_* APIs are managed by devres and are
> freed when the device is detached. Hence there is no need to remove
> them explicitly in remove function.
>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Looks good to me.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] mfd: ab8500-core: Fix invalid free of devm_ allocated data
2012-11-23 12:18 [PATCH] mfd: ab8500-core: Fix invalid free of devm_ allocated data Tushar Behera
2012-11-28 15:48 ` Linus Walleij
@ 2012-11-30 10:52 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2012-11-30 10:52 UTC (permalink / raw)
To: linux-arm-kernel
Hi Tushar,
On Fri, Nov 23, 2012 at 05:48:43PM +0530, Tushar Behera wrote:
> The objects allocated by devm_* APIs are managed by devres and are
> freed when the device is detached. Hence there is no need to remove
> them explicitly in remove function.
>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> drivers/mfd/ab8500-core.c | 5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
Applied, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-30 10:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-23 12:18 [PATCH] mfd: ab8500-core: Fix invalid free of devm_ allocated data Tushar Behera
2012-11-28 15:48 ` Linus Walleij
2012-11-30 10:52 ` Samuel Ortiz
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).