Skip to contentSkip to conversation

drivers/sbus/char: add of_node_put()

PATCH Applied Yangtao Li 2 participants 2 messages Nov 20, 2018 – Dec 3, 2018 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH 1/1 drivers/sbus/char: add of_node_put()

use of_node_put() to release the refcount.

---
 drivers/sbus/char/envctrl.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/sbus/char/envctrl.c +2 -0
index 56e962a01493..b8481927bfe4 100644
@@ -910,8 +910,10 @@ static void envctrl_init_i2c_child(struct device_node *dp,
 			for (len = 0; len < PCF8584_MAX_CHANNELS; ++len) {
 				pchild->mon_type[len] = ENVCTRL_NOMON;
 			}
+			of_node_put(root_node);
 			return;
 		}
+		of_node_put(root_node);
 	}
 
 	/* Get the monitor channels. */
Signature · 1 line
2.17.0