Skip to contentSkip to conversation

watchdog: cpwd: add of_node_put()

PATCH In review Yangtao Li 2 participants 2 messages Nov 20, 2018 Watchdog device drivers

lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH v2 1/1 watchdog: cpwd: add of_node_put()

use of_node_put() to release the refcount.

---
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(+)
drivers/watchdog/cpwd.c +2 -0
index aee0b25cf10d..32156e199c51 100644
@@ -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.
Signature · 1 line
2.17.0
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 3 lines · Yangtao Li

use of_node_put() to release the refcount.

Quoted 22 lines

---
Changes in v2:

(quoted diff) +0 -2
-do that right after its last use to also cover
  error handling.
---
  drivers/watchdog/cpwd.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/watchdog/cpwd.c +2 -0
index aee0b25cf10d..32156e199c51 100644
@@ -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.