Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: ts4800: release syscon device node in ts4800_wdt_probe()

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>

authored by

Alexey Khoroshilov and committed by
Wim Van Sebroeck
cd6ba41c c8ca6e70

+1
+1
drivers/watchdog/ts4800_wdt.c
··· 135 135 /* set regmap and offset to know where to write */ 136 136 wdt->feed_offset = reg; 137 137 wdt->regmap = syscon_node_to_regmap(syscon_np); 138 + of_node_put(syscon_np); 138 139 if (IS_ERR(wdt->regmap)) { 139 140 dev_err(&pdev->dev, "cannot get parent's regmap\n"); 140 141 return PTR_ERR(wdt->regmap);