]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
dpaa2-mac: do not check for both child and parent DTS nodes
authorIoana Ciornei <ioana.ciornei@nxp.com>
Fri, 25 Sep 2020 14:44:19 +0000 (17:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Sep 2020 00:10:27 +0000 (17:10 -0700)
There is no need to check if both the MDIO controller node and its
child node, the PCS device, are available since there is no chance that
the child node would be enabled when the parent it's not.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c

index 6ff64dd1cf2740bb1337dd7ba0d8dd1f240e7f8e..cdd1acd0117eb48a828dc6f88d27e88fde6cdfb2 100644 (file)
@@ -267,8 +267,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
                return 0;
        }
 
-       if (!of_device_is_available(node) ||
-           !of_device_is_available(node->parent)) {
+       if (!of_device_is_available(node)) {
                netdev_err(mac->net_dev, "pcs-handle node not available\n");
                return -ENODEV;
        }