2022-04-22 19:48:17

by baihaowen

[permalink] [raw]
Subject: [PATCH] tsnep: Remove useless null check before call of_node_put()

No need to add null check before call of_node_put(), since the
implementation of of_node_put() has done it.

Signed-off-by: Haowen Bai <[email protected]>
---
drivers/net/ethernet/engleder/tsnep_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index 904f3304727e..49c93aa38862 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -1091,8 +1091,7 @@ static int tsnep_mdio_init(struct tsnep_adapter *adapter)
retval = of_mdiobus_register(adapter->mdiobus, np);

out:
- if (np)
- of_node_put(np);
+ of_node_put(np);

return retval;
}
--
2.7.4


2022-04-23 00:23:37

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH] tsnep: Remove useless null check before call of_node_put()

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <[email protected]>:

On Thu, 21 Apr 2022 10:48:03 +0800 you wrote:
> No need to add null check before call of_node_put(), since the
> implementation of of_node_put() has done it.
>
> Signed-off-by: Haowen Bai <[email protected]>
> ---
> drivers/net/ethernet/engleder/tsnep_main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- tsnep: Remove useless null check before call of_node_put()
https://git.kernel.org/netdev/net-next/c/f28c47bb9fd3

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