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: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8d71397bd2
commit
055a94177d
|
@ -1013,8 +1013,8 @@ int hns_phy_led_set(struct net_device *netdev, int value)
|
|||
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_LED_FC_REG, value);
|
||||
retval = phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_COPPER);
|
||||
retval |= phy_write(phy_dev, HNS_LED_FC_REG, value);
|
||||
retval |= phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_COPPER);
|
||||
if (retval) {
|
||||
netdev_err(netdev, "mdiobus_write fail !\n");
|
||||
return retval;
|
||||
|
|
Loading…
Reference in New Issue