From: Axel Lin <axel.lin@ingics.com>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: David Dajun Chen <dchen@diasemi.com>,
Ashish Jangam <ashish.jangam@kpitcummins.com>,
linux-watchdog@vger.kernel.org
Subject: [PATCH] watchdog: da9055: Fix invalid free of devm_ allocated data
Date: Fri, 21 Dec 2012 21:09:06 +0800 [thread overview]
Message-ID: <1356095346.18328.0.camel@phoenix> (raw)
It is not required to free devm_ allocated data. Since kref_put
needs a valid release function, da9055_wdt_release_resources()
is not deleted.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/watchdog/da9055_wdt.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/watchdog/da9055_wdt.c b/drivers/watchdog/da9055_wdt.c
index 709ea1a..31d5379 100644
--- a/drivers/watchdog/da9055_wdt.c
+++ b/drivers/watchdog/da9055_wdt.c
@@ -102,10 +102,6 @@ static int da9055_wdt_ping(struct watchdog_device *wdt_dev)
static void da9055_wdt_release_resources(struct kref *r)
{
- struct da9055_wdt_data *driver_data =
- container_of(r, struct da9055_wdt_data, kref);
-
- kfree(driver_data);
}
static void da9055_wdt_ref(struct watchdog_device *wdt_dev)
--
1.7.9.5
reply other threads:[~2012-12-21 13:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1356095346.18328.0.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=ashish.jangam@kpitcummins.com \
--cc=dchen@diasemi.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
/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).