Skip to contentSkip to conversation

watchdog: da9055: Fix invalid free of devm_ allocated data

PATCH New Axel Lin 1 participant 1 message Dec 21, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 watchdog: da9055: Fix invalid free of devm_ allocated data

It is not required to free devm_ allocated data. Since kref_put needs a valid release function, da9055_wdt_release_resources() is not deleted.

---
 drivers/watchdog/da9055_wdt.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/watchdog/da9055_wdt.c +0 -4
index 709ea1a..31d5379 100644
@@ -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)
Signature · 1 line
1.7.9.5