watchdog: da9055: Fix invalid free of devm_ allocated data
authorAxel Lin <axel.lin@ingics.com>
Fri, 21 Dec 2012 13:09:06 +0000 (21:09 +0800)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 2 Jan 2013 11:06:43 +0000 (12:06 +0100)
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>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/da9055_wdt.c

index 709ea1aefebbfdb636e05eef8b1ab34eba2b5a5c..31d537959bcce994dd7801561ef1376510f4cda2 100644 (file)
@@ -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)