* [PATCH] clk: qcom: Do not drop device node twice
@ 2017-02-11 23:04 Guenter Roeck
2017-02-14 20:06 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2017-02-11 23:04 UTC (permalink / raw)
To: Andy Gross
Cc: David Brown, Michael Turquette, Stephen Boyd, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, Guenter Roeck, Rob Herring
of_find_node_by_name() drops the reference to a passed device node.
It is not necessary to drop it again, and doing so may result in the
device node being released prematurely.
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/clk/qcom/common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index cfab7b400381..03f9d316f969 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -145,7 +145,6 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path,
clocks_node = of_find_node_by_path("/clocks");
if (clocks_node)
node = of_find_node_by_name(clocks_node, path);
- of_node_put(clocks_node);
if (!node) {
fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: qcom: Do not drop device node twice
2017-02-11 23:04 [PATCH] clk: qcom: Do not drop device node twice Guenter Roeck
@ 2017-02-14 20:06 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2017-02-14 20:06 UTC (permalink / raw)
To: Guenter Roeck
Cc: Andy Gross, David Brown, Michael Turquette, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, Rob Herring
On 02/11, Guenter Roeck wrote:
> of_find_node_by_name() drops the reference to a passed device node.
> It is not necessary to drop it again, and doing so may result in the
> device node being released prematurely.
>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-14 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-11 23:04 [PATCH] clk: qcom: Do not drop device node twice Guenter Roeck
2017-02-14 20:06 ` Stephen Boyd
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).