linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: rockchip: power-domain: fix err handle while probing
@ 2016-02-01  8:18 Shawn Lin
  2016-02-02 21:19 ` Heiko Stübner
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2016-02-01  8:18 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/soc/rockchip/pm_domains.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 534c589..4a65c5b 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -419,6 +419,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;
 		}
 	}
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] soc: rockchip: power-domain: fix err handle while probing
  2016-02-01  8:18 [PATCH] soc: rockchip: power-domain: fix err handle while probing Shawn Lin
@ 2016-02-02 21:19 ` Heiko Stübner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stübner @ 2016-02-02 21:19 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag, 1. Februar 2016, 16:18:40 schrieb Shawn Lin:
> 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.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

applied to my drivers-branch for 4.6


Thanks
Heiko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-02 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01  8:18 [PATCH] soc: rockchip: power-domain: fix err handle while probing Shawn Lin
2016-02-02 21:19 ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).