Skip to content
Snippets Groups Projects
Commit 90c6f2e2 authored by Michal Simek's avatar Michal Simek
Browse files

net: gem: Check if priv->phydev is valid


Check return value.

Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Reviewed-by: default avatarJagan Teki <jteki@openedev.com>
parent 68cc3bd8
No related branches found
No related tags found
No related merge requests found
...@@ -329,6 +329,8 @@ static int zynq_phy_init(struct eth_device *dev) ...@@ -329,6 +329,8 @@ static int zynq_phy_init(struct eth_device *dev)
priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev, priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev,
priv->interface); priv->interface);
if (!priv->phydev)
return -ENODEV;
priv->phydev->supported = supported | ADVERTISED_Pause | priv->phydev->supported = supported | ADVERTISED_Pause |
ADVERTISED_Asym_Pause; ADVERTISED_Asym_Pause;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment