From: Sergei Shtylyov Date: Sun, 24 Apr 2016 17:27:49 +0000 (+0300) Subject: xgene: get_phy_device() doesn't return NULL anymore X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb1116ab7cf55f9b022c2a2d40a0f0c4464eb201;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c index 39e081a70f5b..457f74500242 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);