Skip to content

Commit

Permalink
watchdog: da9052: Fix invalid free of devm_ allocated data
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Tushar Behera authored and Wim Van Sebroeck committed Dec 19, 2012
1 parent 2bc3f62 commit 0360dff
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/watchdog/da9052_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0360dff

Please sign in to comment.