* [PATCH net-next] net: hns3: Fixes the wrong IS_ERR check on the returned phydev value
@ 2017-08-30 11:06 Salil Mehta
2017-08-30 22:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Salil Mehta @ 2017-08-30 11:06 UTC (permalink / raw)
To: davem
Cc: salil.mehta, yisen.zhuang, mehta.salil.lnk, netdev, linux-kernel,
linuxarm
This patch removes the wrong check being done for the phy device being
returned by the mdiobus_get_phy() function. This function never returns
the error pointers.
Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet
Driver for hip08 SoC")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
index a2add8b..f32d719 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
@@ -150,7 +150,7 @@ int hclge_mac_mdio_config(struct hclge_dev *hdev)
}
phydev = mdiobus_get_phy(mdio_bus, mac->phy_addr);
- if (!phydev || IS_ERR(phydev)) {
+ if (!phydev) {
dev_err(mdio_bus->parent, "Failed to get phy device\n");
mdiobus_unregister(mdio_bus);
return -EIO;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: hns3: Fixes the wrong IS_ERR check on the returned phydev value
2017-08-30 11:06 [PATCH net-next] net: hns3: Fixes the wrong IS_ERR check on the returned phydev value Salil Mehta
@ 2017-08-30 22:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-30 22:30 UTC (permalink / raw)
To: salil.mehta; +Cc: yisen.zhuang, mehta.salil.lnk, netdev, linux-kernel, linuxarm
From: Salil Mehta <salil.mehta@huawei.com>
Date: Wed, 30 Aug 2017 12:06:03 +0100
> This patch removes the wrong check being done for the phy device being
> returned by the mdiobus_get_phy() function. This function never returns
> the error pointers.
>
> Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet
> Driver for hip08 SoC")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-30 22:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 11:06 [PATCH net-next] net: hns3: Fixes the wrong IS_ERR check on the returned phydev value Salil Mehta
2017-08-30 22:30 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.