linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: da9052: Fix invalid free of devm_ allocated data
@ 2012-11-22  4:43 Tushar Behera
  2012-11-26 13:01 ` Shubhrajyoti Datta
  0 siblings, 1 reply; 3+ messages in thread
From: Tushar Behera @ 2012-11-22  4:43 UTC (permalink / raw)
  To: linux-kernel, linux-watchdog; +Cc: wim, patches, Anthony.Olech

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


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

end of thread, other threads:[~2012-11-27  5:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22  4:43 [PATCH] watchdog: da9052: Fix invalid free of devm_ allocated data Tushar Behera
2012-11-26 13:01 ` Shubhrajyoti Datta
2012-11-27  5:29   ` Tushar Behera

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