LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net] net: qcom/emac: Add missing of_node_put()
@ 2018-06-11 13:03 YueHaibing
2018-06-12 2:03 ` Timur Tabi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2018-06-11 13:03 UTC (permalink / raw)
To: timur, davem; +Cc: linux-kernel, netdev, YueHaibing
Add missing of_node_put() call for device node returned by
of_parse_phandle().
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c b/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
index e78e5db..c694e34 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
@@ -384,6 +384,7 @@ int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt)
}
sgmii_pdev = of_find_device_by_node(np);
+ of_node_put(np);
if (!sgmii_pdev) {
dev_err(&pdev->dev, "invalid internal-phy property\n");
return -ENODEV;
--
2.7.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: qcom/emac: Add missing of_node_put()
2018-06-11 13:03 [PATCH net] net: qcom/emac: Add missing of_node_put() YueHaibing
@ 2018-06-12 2:03 ` Timur Tabi
2018-06-13 20:45 ` Timur Tabi
2018-06-15 0:01 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Timur Tabi @ 2018-06-12 2:03 UTC (permalink / raw)
To: YueHaibing, davem; +Cc: linux-kernel, netdev
On 6/11/18 8:03 AM, YueHaibing wrote:
> Add missing of_node_put() call for device node returned by
> of_parse_phandle().
Hmmmm... This shouldn't be necessary. I was very careful with calls to
of_node_put(). Give me a day or two to confirm, please.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: qcom/emac: Add missing of_node_put()
2018-06-11 13:03 [PATCH net] net: qcom/emac: Add missing of_node_put() YueHaibing
2018-06-12 2:03 ` Timur Tabi
@ 2018-06-13 20:45 ` Timur Tabi
2018-06-15 0:01 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Timur Tabi @ 2018-06-13 20:45 UTC (permalink / raw)
To: YueHaibing, davem; +Cc: linux-kernel, netdev, Hemanth Puranik
On 06/11/2018 08:03 AM, YueHaibing wrote:
> Add missing of_node_put() call for device node returned by
> of_parse_phandle().
>
> Signed-off-by: YueHaibing<yuehaibing@huawei.com>
Acked-by: Timur Tabi <timur@codeaurora.org>
This seems legit. The comment for of_find_device_by_node() that says
the np needs to be released was added after the code was written, so
it's possible that I didn't know at the time that this was a requirement.
However, I no longer have the ability to test EMAC on device tree
platforms, so I can't verify this code.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: qcom/emac: Add missing of_node_put()
2018-06-11 13:03 [PATCH net] net: qcom/emac: Add missing of_node_put() YueHaibing
2018-06-12 2:03 ` Timur Tabi
2018-06-13 20:45 ` Timur Tabi
@ 2018-06-15 0:01 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-06-15 0:01 UTC (permalink / raw)
To: yuehaibing; +Cc: timur, linux-kernel, netdev
From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 11 Jun 2018 21:03:45 +0800
> Add missing of_node_put() call for device node returned by
> of_parse_phandle().
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-06-15 0:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11 13:03 [PATCH net] net: qcom/emac: Add missing of_node_put() YueHaibing
2018-06-12 2:03 ` Timur Tabi
2018-06-13 20:45 ` Timur Tabi
2018-06-15 0:01 ` David Miller
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).