From: Tushar Behera Date: Thu, 22 Nov 2012 04:43:04 +0000 (+0530) Subject: watchdog: da9052: Fix invalid free of devm_ allocated data X-Git-Tag: firefly_0821_release~3680^2~1342^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0360dffedd7bad92f174b2ce5e69e960451d2b59;p=firefly-linux-kernel-4.4.55.git watchdog: da9052: Fix invalid free of devm_ allocated data 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 Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index 8be70d8f2680..367445009c64 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,