Re: [PATCH v2] watchdog: cpwd: add of_node_put()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

---
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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux