linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ipa: Add missing of_node_put() in ipa_firmware_load()
@ 2021-06-17  5:11 Yang Yingliang
  2021-06-17 10:17 ` Alex Elder
  2021-06-17 18:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2021-06-17  5:11 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: elder, davem, kuba

This node pointer is returned by of_parse_phandle() with refcount
incremented in this function. of_node_put() on it before exiting
this function.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ipa/ipa_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 2243e3e5b7ea..f82130db32f6 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -530,6 +530,7 @@ static int ipa_firmware_load(struct device *dev)
 	}
 
 	ret = of_address_to_resource(node, 0, &res);
+	of_node_put(node);
 	if (ret) {
 		dev_err(dev, "error %d getting \"memory-region\" resource\n",
 			ret);
-- 
2.25.1


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

* Re: [PATCH net-next] net: ipa: Add missing of_node_put() in ipa_firmware_load()
  2021-06-17  5:11 [PATCH net-next] net: ipa: Add missing of_node_put() in ipa_firmware_load() Yang Yingliang
@ 2021-06-17 10:17 ` Alex Elder
  2021-06-17 18:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Elder @ 2021-06-17 10:17 UTC (permalink / raw)
  To: Yang Yingliang, linux-kernel, netdev; +Cc: elder, davem, kuba

On 6/17/21 12:11 AM, Yang Yingliang wrote:
> This node pointer is returned by of_parse_phandle() with refcount
> incremented in this function. of_node_put() on it before exiting
> this function.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Acked-by: Alex Elder <elder@linaro.org>

> ---
>   drivers/net/ipa/ipa_main.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
> index 2243e3e5b7ea..f82130db32f6 100644
> --- a/drivers/net/ipa/ipa_main.c
> +++ b/drivers/net/ipa/ipa_main.c
> @@ -530,6 +530,7 @@ static int ipa_firmware_load(struct device *dev)
>   	}
>   
>   	ret = of_address_to_resource(node, 0, &res);
> +	of_node_put(node);
>   	if (ret) {
>   		dev_err(dev, "error %d getting \"memory-region\" resource\n",
>   			ret);
> 


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

* Re: [PATCH net-next] net: ipa: Add missing of_node_put() in ipa_firmware_load()
  2021-06-17  5:11 [PATCH net-next] net: ipa: Add missing of_node_put() in ipa_firmware_load() Yang Yingliang
  2021-06-17 10:17 ` Alex Elder
@ 2021-06-17 18:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-17 18:40 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, netdev, elder, davem, kuba

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 17 Jun 2021 13:11:19 +0800 you wrote:
> This node pointer is returned by of_parse_phandle() with refcount
> incremented in this function. of_node_put() on it before exiting
> this function.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: ipa: Add missing of_node_put() in ipa_firmware_load()
    https://git.kernel.org/netdev/net-next/c/b244163f2c45

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-06-17 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  5:11 [PATCH net-next] net: ipa: Add missing of_node_put() in ipa_firmware_load() Yang Yingliang
2021-06-17 10:17 ` Alex Elder
2021-06-17 18:40 ` patchwork-bot+netdevbpf

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).