soc: rockchip: power-domain: fix err handle while probing
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 1 Feb 2016 08:18:40 +0000 (16:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 May 2016 09:21:11 +0000 (11:21 +0200)
commite6ce6ce062650eda95bc2b44420a4a7151c42d8a
tree9d1ca1deead0ece8d6818e4efa56b806cd863680
parentf0e92143b8e2e6fa1e854385667427011cfe1059
soc: rockchip: power-domain: fix err handle while probing

commit 1d961f11a108af9f7fbe89cc950a8d16ddbdbb28 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/rockchip/pm_domains.c