scsi: hpsa: Fix allocation size for scsi_host_alloc()
[platform/kernel/linux-rpi.git] / drivers / clk / clk-qoriq.c
index 88898b9..5eddb9f 100644 (file)
@@ -1063,8 +1063,13 @@ static void __init _clockgen_init(struct device_node *np, bool legacy);
  */
 static void __init legacy_init_clockgen(struct device_node *np)
 {
-       if (!clockgen.node)
-               _clockgen_init(of_get_parent(np), true);
+       if (!clockgen.node) {
+               struct device_node *parent_np;
+
+               parent_np = of_get_parent(np);
+               _clockgen_init(parent_np, true);
+               of_node_put(parent_np);
+       }
 }
 
 /* Legacy node */
@@ -1159,6 +1164,7 @@ static struct clk * __init create_sysclk(const char *name)
        sysclk = of_get_child_by_name(clockgen.node, "sysclk");
        if (sysclk) {
                clk = sysclk_from_fixed(sysclk, name);
+               of_node_put(sysclk);
                if (!IS_ERR(clk))
                        return clk;
        }