Merge branches 'clk-imx', 'clk-samsung', 'clk-ti', 'clk-uniphier-gear' and 'clk-mmp2...
[linux-2.6-microblaze.git] / drivers / clk / ti / clk.c
index d1f9481..ff164a3 100644 (file)
@@ -192,9 +192,13 @@ void __init ti_dt_clocks_register(struct ti_dt_clk oclks[])
                        clkdev_add(&c->lk);
                } else {
                        if (num_args && !has_clkctrl_data) {
-                               if (of_find_compatible_node(NULL, NULL,
-                                                           "ti,clkctrl")) {
+                               struct device_node *np;
+
+                               np = of_find_compatible_node(NULL, NULL,
+                                                            "ti,clkctrl");
+                               if (np) {
                                        has_clkctrl_data = true;
+                                       of_node_put(np);
                                } else {
                                        clkctrl_nodes_missing = true;