summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2020-09-25 17:44:19 +0300
committerDavid S. Miller <davem@davemloft.net>2020-09-25 17:10:27 -0700
commit98179709c95ecd60274668a20365a0cd0b3726eb (patch)
treeeda0ea3218eb4342f29a8078fa9764287b4c5e87 /drivers/net
parentbd0b68a8abf1eb523c0e2a59d0d2f162f9fc3ac1 (diff)
downloadlinux-98179709c95ecd60274668a20365a0cd0b3726eb.tar.bz2
dpaa2-mac: do not check for both child and parent DTS nodes
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
index 6ff64dd1cf27..cdd1acd0117e 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
@@ -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;
}