of_mdio: avoid MDIO bus removal when a PHY is missing
authorMadalin Bucur <madalin.bucur@nxp.com>
Tue, 9 Jan 2018 12:43:34 +0000 (14:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Mar 2018 09:24:37 +0000 (10:24 +0100)
commite69660fdecda3bb58e8f3e9e7b0dc36efbad1b96
tree488b5ebda9a802687f75743a0610e1b072c2b47d
parent83d9e9c211fe885d03e9acb425be3cf55c1d3bd8
of_mdio: avoid MDIO bus removal when a PHY is missing

[ Upstream commit 95f566de0269a0c59fd6a737a147731302136429 ]

If one of the child devices is missing the of_mdiobus_register_phy()
call will return -ENODEV. When a missing device is encountered the
registration of the remaining PHYs is stopped and the MDIO bus will
fail to register. Propagate all errors except ENODEV to avoid it.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/of_mdio.c