summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-02-01 11:18:40 +0300
committerHeiko Stuebner <heiko@sntech.de>2016-02-03 00:18:31 +0300
commit1d961f11a108af9f7fbe89cc950a8d16ddbdbb28 (patch)
tree43c6bf25f0bfecd8f05aff36d2ec3322d1b3cf96 /drivers/soc
parent8c20b67f2873bffb37cb64b806af0aca0212dae4 (diff)
downloadlinux-1d961f11a108af9f7fbe89cc950a8d16ddbdbb28.tar.xz
soc: rockchip: power-domain: fix err handle while probing
If we fail to probe the driver, we should not directly break from the for_each_available_child_of_node since it calls of_node_get while iterating. This patch add of_node_put to fix the unbalanced call pair. Fixes: 7c696693a4f5 ("soc: rockchip: power-domain: Add power domain driver") Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/rockchip/pm_domains.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 6cdffb13c862..43155e1f97b9 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -423,6 +423,7 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
if (error) {
dev_err(dev, "failed to handle node %s: %d\n",
node->name, error);
+ of_node_put(node);
goto err_out;
}
}