drivers/sbus/char: add of_node_put()
authorYangtao Li <tiny.windzz@gmail.com>
Tue, 20 Nov 2018 13:38:26 +0000 (08:38 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Dec 2018 04:55:23 +0000 (20:55 -0800)
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>
drivers/sbus/char/envctrl.c

index 56e962a014939e31c7ad74687263ecd69558ef7b..b8481927bfe4048b4147e01c77c0f7f695ab90bb 100644 (file)
@@ -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. */