linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extcon: trivial: kfree missed from remove path
@ 2012-10-21  4:58 anish kumar
  2012-10-22  1:12 ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: anish kumar @ 2012-10-21  4:58 UTC (permalink / raw)
  To: gregkh, myungjoo.ham, cw00.choi; +Cc: linux-kernel, anish kumar

From: anish kumar <anish198519851985@gmail.com>

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

Signed-off-by: anish kumar <anish198519851985@gmail.com>
---
 drivers/extcon/extcon-max77693.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index e21387e..67bc9ab 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -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;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] extcon: trivial: kfree missed from remove path
  2012-10-21  4:58 [PATCH] extcon: trivial: kfree missed from remove path anish kumar
@ 2012-10-22  1:12 ` Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2012-10-22  1:12 UTC (permalink / raw)
  To: anish kumar; +Cc: gregkh, myungjoo.ham, linux-kernel

On 10/21/2012 01:58 PM, anish kumar wrote:
> From: anish kumar <anish198519851985@gmail.com>
> 
> Extcon core doesn't free the memory when we do unregister.
> Kfree is added in the remove path as it was missing.
> 
> Signed-off-by: anish kumar <anish198519851985@gmail.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-22  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-21  4:58 [PATCH] extcon: trivial: kfree missed from remove path anish kumar
2012-10-22  1:12 ` Chanwoo Choi

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).