Skip to contentSkip to conversation

extcon: trivial: kfree missed from remove path

PATCH Applied anish kumar 2 participants 2 messages Oct 21, 2012 – Oct 22, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 extcon: trivial: kfree missed from remove path

From: anish kumar <[email protected]>

Extcon core doesn't free the memory when we do unregister. Kfree is added in the remove path as it was missing.

---
 drivers/extcon/extcon-max77693.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/extcon/extcon-max77693.c +1 -0
index e21387e..67bc9ab 100644
@@ -762,6 +762,7 @@ static int __devexit max77693_muic_remove(struct platform_device *pdev)
 		free_irq(muic_irqs[i].virq, info);
 	cancel_work_sync(&info->irq_work);
 	extcon_dev_unregister(info->edev);
+	kfree(info->edev);
 	kfree(info);
 
 	return 0;
Signature · 1 line
1.7.1
maintainer Applied
#1 lore raw
Quoted 9 lines · anish kumar

From: anish kumar <[email protected]>

Extcon core doesn't free the memory when we do unregister. Kfree is added in the remove path as it was missing.

---
 drivers/extcon/extcon-max77693.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

You can check it after some hours at extcon tree:
- http://git.infradead.org/users/kmpark/linux-samsung/shortlog/refs/heads/extcon-for-next

Chanwoo Choi