From: anish kumar <anish198519851985@gmail.com>
To: gregkh@linuxfoundation.org, myungjoo.ham@samsung.com,
cw00.choi@samsung.com
Cc: linux-kernel@vger.kernel.org, anish kumar <anish198519851985@gmail.com>
Subject: [PATCH] extcon: trivial: kfree missed from remove path
Date: Sun, 21 Oct 2012 13:58:59 +0900 [thread overview]
Message-ID: <1350795539-13206-1-git-send-email-anish198519851985@gmail.com> (raw)
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
next reply other threads:[~2012-10-21 4:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-21 4:58 anish kumar [this message]
2012-10-22 1:12 ` [PATCH] extcon: trivial: kfree missed from remove path Chanwoo Choi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350795539-13206-1-git-send-email-anish198519851985@gmail.com \
--to=anish198519851985@gmail.com \
--cc=cw00.choi@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).