mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
net: gem: Check if priv->phydev is valid
Check return value. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
This commit is contained in:
parent
68cc3bd8b2
commit
90c6f2e21b
1 changed files with 2 additions and 0 deletions
|
@ -329,6 +329,8 @@ static int zynq_phy_init(struct eth_device *dev)
|
|||
|
||||
priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev,
|
||||
priv->interface);
|
||||
if (!priv->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
priv->phydev->supported = supported | ADVERTISED_Pause |
|
||||
ADVERTISED_Asym_Pause;
|
||||
|
|
Loading…
Add table
Reference in a new issue