Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19d382b2 authored by Sneh Shah's avatar Sneh Shah
Browse files

net: stmmac: Fix phy detection issue in case of no phycard connected



Check phy_id of detected phydev.

Change-Id: I27caeeecdad8c809c809436db875484f685f22da
Signed-off-by: default avatarSneh Shah <snehshah@codeaurora.org>
parent 91aa9b06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ int stmmac_mdio_register(struct net_device *ndev)
	for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
		struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);

		if (!phydev)
		if (!phydev || phydev->phy_id == 0xffff)
			continue;

		/*