linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] watchdog: cpwd: add of_node_put()
@ 2018-11-20 14:54 Yangtao Li
  2018-11-20 15:00 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-11-20 14:54 UTC (permalink / raw)
  To: wim, linux; +Cc: linux-watchdog, linux-kernel, Yangtao Li

use of_node_put() to release the refcount.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
Changes in v2:
-do that right after its last use to also cover
 error handling.
---
 drivers/watchdog/cpwd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index aee0b25cf10d..32156e199c51 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -570,6 +570,8 @@ static int cpwd_probe(struct platform_device *op)
 	if (str_prop)
 		p->timeout = simple_strtoul(str_prop, NULL, 10);
 
+	of_node_put(options);
+
 	/* CP1400s seem to have broken PLD implementations-- the
 	 * interrupt_mask register cannot be written, so no timer
 	 * interrupts can be masked within the PLD.
-- 
2.17.0


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

* Re: [PATCH v2] watchdog: cpwd: add of_node_put()
  2018-11-20 14:54 [PATCH v2] watchdog: cpwd: add of_node_put() Yangtao Li
@ 2018-11-20 15:00 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2018-11-20 15:00 UTC (permalink / raw)
  To: Yangtao Li, wim; +Cc: linux-watchdog, linux-kernel

On 11/20/18 6:54 AM, Yangtao Li wrote:
> use of_node_put() to release the refcount.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Changes in v2:
> -do that right after its last use to also cover
>   error handling.
> ---
>   drivers/watchdog/cpwd.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
> index aee0b25cf10d..32156e199c51 100644
> --- a/drivers/watchdog/cpwd.c
> +++ b/drivers/watchdog/cpwd.c
> @@ -570,6 +570,8 @@ static int cpwd_probe(struct platform_device *op)
>   	if (str_prop)
>   		p->timeout = simple_strtoul(str_prop, NULL, 10);
>   
> +	of_node_put(options);
> +
>   	/* CP1400s seem to have broken PLD implementations-- the
>   	 * interrupt_mask register cannot be written, so no timer
>   	 * interrupts can be masked within the PLD.
> 

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

end of thread, other threads:[~2018-11-20 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 14:54 [PATCH v2] watchdog: cpwd: add of_node_put() Yangtao Li
2018-11-20 15:00 ` 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).