All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>,
	Anton Vorontsov <cbouatmailru@gmail.com>,
	David Dajun Chen <dchen@diasemi.com>
Subject: [PATCH 2/3] power_supply: da9052-battery: Fix a memory leak when unload the module
Date: Wed, 11 Jan 2012 15:44:37 +0800	[thread overview]
Message-ID: <1326267877.15588.3.camel@phoenix> (raw)
In-Reply-To: <1326267824.15588.2.camel@phoenix>

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/power/da9052-battery.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c
index 07d5b36..daf52a4 100644
--- a/drivers/power/da9052-battery.c
+++ b/drivers/power/da9052-battery.c
@@ -634,6 +634,7 @@ static int __devexit da9052_bat_remove(struct platform_device *pdev)
 		free_irq(bat->da9052->irq_base + irq, bat);
 	}
 	power_supply_unregister(&bat->psy);
+	kfree(bat);
 
 	return 0;
 }
-- 
1.7.5.4




  reply	other threads:[~2012-01-11  7:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11  7:43 [PATCH 1/3] power_supply: da9052-battery: Add missing platform_set_drvdata Axel Lin
2012-01-11  7:44 ` Axel Lin [this message]
2012-01-11  7:45 ` [PATCH 3/3] power_supply: da9052-battery: Convert to use module_platform_driver Axel Lin
2012-03-15 16:52 ` [PATCH 1/3] power_supply: da9052-battery: Add missing platform_set_drvdata Anton Vorontsov

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=1326267877.15588.3.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=ashish.jangam@kpitcummins.com \
    --cc=cbouatmailru@gmail.com \
    --cc=dchen@diasemi.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.