]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
eth: dpaa2-mac: remove a dead-code NULL check on fwnode parent
authorJakub Kicinski <kuba@kernel.org>
Fri, 6 May 2022 20:00:29 +0000 (13:00 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 May 2022 07:19:56 +0000 (09:19 +0200)
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>
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c

index c48811d3bcd54cff353ff99bd5c57993bbf18930..c9bee9a0c9b2bd840fe1611fb13ec52137ef3c8b 100644 (file)
@@ -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))