Skip to content

Commit 9817970

Browse files
IoanaCiorneidavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Ioana Ciornei <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bd0b68a commit 9817970

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
267267
return 0;
268268
}
269269

270-
if (!of_device_is_available(node) ||
271-
!of_device_is_available(node->parent)) {
270+
if (!of_device_is_available(node)) {
272271
netdev_err(mac->net_dev, "pcs-handle node not available\n");
273272
return -ENODEV;
274273
}

0 commit comments

Comments
 (0)