lkml.org 
[lkml]   [2012]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove()
From
Date
extcon_dev_unregister(info->edev) doest not free info->edev, we need to call
kfree(info->edev) here.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/extcon/extcon-max8997.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 5ecf176..a4ed30b 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -514,6 +514,7 @@ static int __devexit max8997_muic_remove(struct platform_device *pdev)

extcon_dev_unregister(info->edev);

+ kfree(info->edev);
kfree(info);

return 0;
--
1.7.9.5




\
 
 \ /
  Last update: 2012-06-16 16:01    [W:0.036 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site