summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2016-04-24 17:27:49 (GMT)
committerDavid S. Miller <davem@davemloft.net>2016-04-26 19:41:19 (GMT)
commitfb1116ab7cf55f9b022c2a2d40a0f0c4464eb201 (patch)
tree9c3b42a120281397585264fde8b5fa814830f02d /drivers
parentb74766a0a0feeef5c779709cc5d109451c0d5b17 (diff)
downloadlinux-fb1116ab7cf55f9b022c2a2d40a0f0c4464eb201.tar.xz
xgene: get_phy_device() doesn't return NULL anymore
Now that get_phy_device() no longer returns NULL on error, we don't need to check for it... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
index 39e081a..457f745 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
@@ -824,7 +824,7 @@ static int xgene_mdiobus_register(struct xgene_enet_pdata *pdata,
return -EINVAL;
phy = get_phy_device(mdio, phy_id, false);
- if (!phy || IS_ERR(phy))
+ if (IS_ERR(phy))
return -EIO;
ret = phy_device_register(phy);