diff options
author | Michal Simek <michal.simek@xilinx.com> | 2015-11-30 14:03:37 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2015-12-07 09:59:05 +0100 |
commit | 90c6f2e21bb980e5544b1339e7ef7038bc872968 (patch) | |
tree | ed38b4f508b12b4cb65a8709d1e8724b281212ba | |
parent | 68cc3bd8b2863667513008c975cc69187855317f (diff) | |
download | u-boot-imx-90c6f2e21bb980e5544b1339e7ef7038bc872968.zip u-boot-imx-90c6f2e21bb980e5544b1339e7ef7038bc872968.tar.gz u-boot-imx-90c6f2e21bb980e5544b1339e7ef7038bc872968.tar.bz2 |
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>
-rw-r--r-- | drivers/net/zynq_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 86bb759..d5540ec 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -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; |