linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: ts4800: release syscon device node in ts4800_wdt_probe()
@ 2018-10-13 20:51 Alexey Khoroshilov
  2018-10-14  4:08 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2018-10-13 20:51 UTC (permalink / raw)
  To: Damien Riegel, Wim Van Sebroeck, Guenter Roeck
  Cc: Alexey Khoroshilov, linux-watchdog, linux-kernel, ldv-project

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>
---
 drivers/watchdog/ts4800_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/ts4800_wdt.c b/drivers/watchdog/ts4800_wdt.c
index 2b8de8602b67..89843b16b04a 100644
--- a/drivers/watchdog/ts4800_wdt.c
+++ b/drivers/watchdog/ts4800_wdt.c
@@ -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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: ts4800: release syscon device node in ts4800_wdt_probe()
  2018-10-13 20:51 [PATCH] watchdog: ts4800: release syscon device node in ts4800_wdt_probe() Alexey Khoroshilov
@ 2018-10-14  4:08 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2018-10-14  4:08 UTC (permalink / raw)
  To: Alexey Khoroshilov, Damien Riegel, Wim Van Sebroeck
  Cc: linux-watchdog, linux-kernel, ldv-project

On 10/13/2018 01:51 PM, Alexey Khoroshilov wrote:
> 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>

> ---
>   drivers/watchdog/ts4800_wdt.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/ts4800_wdt.c b/drivers/watchdog/ts4800_wdt.c
> index 2b8de8602b67..89843b16b04a 100644
> --- a/drivers/watchdog/ts4800_wdt.c
> +++ b/drivers/watchdog/ts4800_wdt.c
> @@ -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);
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-14 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13 20:51 [PATCH] watchdog: ts4800: release syscon device node in ts4800_wdt_probe() Alexey Khoroshilov
2018-10-14  4:08 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).