netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent
@ 2022-05-06 20:00 Jakub Kicinski
  2022-05-10  7:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2022-05-06 20:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, ioana.ciornei

Since commit 4e30e98c4b4c ("dpaa2-mac: return -EPROBE_DEFER from dpaa2_mac_open in case the fwnode is not set")
@parent can't be NULL after the if. It's either the address
of the ->fwnode of @dpmacs or @fwnode in case of ACPI.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
Right, Ioana? Let's clean this up so the of_node_put() bots
go away.

CC: ioana.ciornei@nxp.com
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
index c48811d3bcd5..c9bee9a0c9b2 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
@@ -108,9 +108,6 @@ static struct fwnode_handle *dpaa2_mac_get_node(struct device *dev,
 		return ERR_PTR(-EPROBE_DEFER);
 	}
 
-	if (!parent)
-		return NULL;
-
 	fwnode_for_each_child_node(parent, child) {
 		err = -EINVAL;
 		if (is_acpi_device_node(child))
-- 
2.34.1


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

* Re: [PATCH net-next] eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent
  2022-05-06 20:00 [PATCH net-next] eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent Jakub Kicinski
@ 2022-05-10  7:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-10  7:30 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, ioana.ciornei

Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Fri,  6 May 2022 13:00:29 -0700 you wrote:
> Since commit 4e30e98c4b4c ("dpaa2-mac: return -EPROBE_DEFER from dpaa2_mac_open in case the fwnode is not set")
> @parent can't be NULL after the if. It's either the address
> of the ->fwnode of @dpmacs or @fwnode in case of ACPI.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Right, Ioana? Let's clean this up so the of_node_put() bots
> go away.
> 
> [...]

Here is the summary with links:
  - [net-next] eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent
    https://git.kernel.org/netdev/net-next/c/b3552d6a3b8b

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] 2+ messages in thread

end of thread, other threads:[~2022-05-10  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 20:00 [PATCH net-next] eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent Jakub Kicinski
2022-05-10  7:30 ` 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).