提交 055a9417 编写于 作者: Q Qianqian Xie 提交者: David S. Miller

net: hns: bug fix for return values

The return values in the first two functions mdiobus_write()
are ignored. The patch will fix it.
Signed-off-by: NQianqian Xie <xieqianqian@huawei.com>
Signed-off-by: NYisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8d71397b
...@@ -1013,8 +1013,8 @@ int hns_phy_led_set(struct net_device *netdev, int value) ...@@ -1013,8 +1013,8 @@ int hns_phy_led_set(struct net_device *netdev, int value)
struct phy_device *phy_dev = priv->phy; struct phy_device *phy_dev = priv->phy;
retval = phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_LED); retval = phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_LED);
retval = phy_write(phy_dev, HNS_LED_FC_REG, value); retval |= phy_write(phy_dev, HNS_LED_FC_REG, value);
retval = phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_COPPER); retval |= phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_COPPER);
if (retval) { if (retval) {
netdev_err(netdev, "mdiobus_write fail !\n"); netdev_err(netdev, "mdiobus_write fail !\n");
return retval; return retval;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册