projects
/
platform
/
kernel
/
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
86bb759
..
d5540ec
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;