lkml.org 
[lkml]   [2012]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mfd: ab8500-core: Fix invalid free of devm_ allocated data
Date
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


\
 
 \ /
  Last update: 2012-11-23 14:01    [W:0.042 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site