projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68cc3bd
)
net: gem: Check if priv->phydev is valid
author
Michal Simek
<michal.simek@xilinx.com>
Mon, 30 Nov 2015 13:03:37 +0000
(14:03 +0100)
committer
Michal Simek
<michal.simek@xilinx.com>
Mon, 7 Dec 2015 08:59:05 +0000
(09:59 +0100)
Check return value.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
drivers/net/zynq_gem.c
patch
|
blob
|
history
diff --git
a/drivers/net/zynq_gem.c
b/drivers/net/zynq_gem.c
index 86bb75905071667473203f12509169f272e82884..d5540ec2155c719d3c4a4a1e1f707734b8f034ee 100644
(file)
--- 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;