]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
watchdog: ts4800: release syscon device node in ts4800_wdt_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Sat, 13 Oct 2018 20:51:03 +0000 (23:51 +0300)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 22 Oct 2018 08:16:28 +0000 (10:16 +0200)
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>
drivers/watchdog/ts4800_wdt.c

index 2b8de8602b67ab02c6cef27269228cc8a78d53e2..89843b16b04acca00fca086e0af14cbab80c2fec 100644 (file)
@@ -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);