From: Tushar Behera <tushar.behera@linaro.org>
To: linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Cc: wim@iguana.be, patches@linaro.org, Anthony.Olech@diasemi.com
Subject: [PATCH] watchdog: da9052: Fix invalid free of devm_ allocated data
Date: Thu, 22 Nov 2012 10:13:04 +0530 [thread overview]
Message-ID: <1353559384-26570-1-git-send-email-tushar.behera@linaro.org> (raw)
It is not required to free devm_ allocated data. Since kref_put
needs a valid release function, da9052_wdt_release_resources()
is not deleted.
Fixes following warning.
drivers/watchdog/da9052_wdt.c:59:1-6: WARNING: invalid free of
devm_ allocated data
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
drivers/watchdog/da9052_wdt.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c
index f7abbae..20071de 100644
--- a/drivers/watchdog/da9052_wdt.c
+++ b/drivers/watchdog/da9052_wdt.c
@@ -53,10 +53,6 @@ static const struct {
static void da9052_wdt_release_resources(struct kref *r)
{
- struct da9052_wdt_data *driver_data =
- container_of(r, struct da9052_wdt_data, kref);
-
- kfree(driver_data);
}
static int da9052_wdt_set_timeout(struct watchdog_device *wdt_dev,
--
1.7.4.1
next reply other threads:[~2012-11-22 18:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 4:43 Tushar Behera [this message]
2012-11-26 13:01 ` [PATCH] watchdog: da9052: Fix invalid free of devm_ allocated data Shubhrajyoti Datta
2012-11-27 5:29 ` Tushar Behera
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=1353559384-26570-1-git-send-email-tushar.behera@linaro.org \
--to=tushar.behera@linaro.org \
--cc=Anthony.Olech@diasemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=patches@linaro.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).