Browse Source

drivers/sbus/char: add of_node_put()

use of_node_put() to release the refcount.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yangtao Li 6 năm trước cách đây
mục cha
commit
6bd520ab7c
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      drivers/sbus/char/envctrl.c

+ 2 - 0
drivers/sbus/char/envctrl.c

@@ -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. */