diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 309371abfe232300850e29137c6e885ebd2a403f..ffce528aa00e4a3a030af4dc283b8e04fa18237d 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -901,7 +901,7 @@ static int macb_mdiobus_register(struct macb *bp) * directly under the MAC node */ child = of_get_child_by_name(np, "mdio"); - if (np) { + if (child) { int ret = of_mdiobus_register(bp->mii_bus, child); of_node_put(child);