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>
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;
}