summaryrefslogtreecommitdiffstats
path: root/drivers/soc/dove/pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soc/dove/pmu.c')
-rw-r--r--drivers/soc/dove/pmu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/soc/dove/pmu.c b/drivers/soc/dove/pmu.c
index ffc5311c0e..6202dbcd20 100644
--- a/drivers/soc/dove/pmu.c
+++ b/drivers/soc/dove/pmu.c
@@ -410,13 +410,16 @@ int __init dove_init_pmu(void)
struct pmu_domain *domain;
domain = kzalloc(sizeof(*domain), GFP_KERNEL);
- if (!domain)
+ if (!domain) {
+ of_node_put(np);
break;
+ }
domain->pmu = pmu;
domain->base.name = kasprintf(GFP_KERNEL, "%pOFn", np);
if (!domain->base.name) {
kfree(domain);
+ of_node_put(np);
break;
}