Merge tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-shmobile / pm-rmobile.c
index a5b96b990aea8dfc551ea56f0421cd0837b68a82..424155b0cfe98965e984d82a22e563294c95e483 100644 (file)
@@ -342,8 +342,10 @@ static int __init rmobile_add_pm_domains(void __iomem *base,
                }
 
                pd = kzalloc(sizeof(*pd), GFP_KERNEL);
-               if (!pd)
+               if (!pd) {
+                       of_node_put(np);
                        return -ENOMEM;
+               }
 
                pd->genpd.name = np->name;
                pd->base = base;