Skip to content

Commit

Permalink
eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent
Browse files Browse the repository at this point in the history
Since commit 4e30e98 ("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>
  • Loading branch information
Jakub Kicinski authored and Paolo Abeni committed May 10, 2022
1 parent 9eab75d commit b3552d6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b3552d6

Please sign in to comment.