Skip to content

Commit

Permalink
watchdog: ts4800: release syscon device node in ts4800_wdt_probe()
Browse files Browse the repository at this point in the history
Put syscon device node when it is not needed anymore.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
  • Loading branch information
Alexey Khoroshilov authored and Wim Van Sebroeck committed Oct 22, 2018
1 parent c8ca6e7 commit cd6ba41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/watchdog/ts4800_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ static int ts4800_wdt_probe(struct platform_device *pdev)
/* set regmap and offset to know where to write */
wdt->feed_offset = reg;
wdt->regmap = syscon_node_to_regmap(syscon_np);
of_node_put(syscon_np);
if (IS_ERR(wdt->regmap)) {
dev_err(&pdev->dev, "cannot get parent's regmap\n");
return PTR_ERR(wdt->regmap);
Expand Down

0 comments on commit cd6ba41

Please sign in to comment.