Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent

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>
Link: https://lore.kernel.org/r/20220506200029.852310-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Jakub Kicinski and committed by
Paolo Abeni
b3552d6a 9eab75d4

-3
-3
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
··· 108 108 return ERR_PTR(-EPROBE_DEFER); 109 109 } 110 110 111 - if (!parent) 112 - return NULL; 113 - 114 111 fwnode_for_each_child_node(parent, child) { 115 112 err = -EINVAL; 116 113 if (is_acpi_device_node(child))