net: macb: Fix mdio child node detection
Commit 4d98bb0d ("net: macb: Use mdio child node for MDIO bus if it exists") added code to detect if a 'mdio' child node exists to the macb driver. Ths added code does, however, not actually check if the child node exists, but if the parent node exists. This results in errors such as macb 10090000.ethernet eth0: Could not attach PHY (-19) if there is no 'mdio' child node. Fix the code to actually check for the child node. Fixes: 4d98bb0d ("net: macb: Use mdio child node for MDIO bus if it exists") Cc: Andrew Lunn <andrew@lunn.ch> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NSean Anderson <sean.anderson@seco.com> Tested-by: NClaudiu Beznea <claudiu.beznea@microchip.com> Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20211026173950.353636-1-linux@roeck-us.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Showing
想要评论请 注册 或 登录