summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQianqian Xie <xieqianqian@huawei.com>2016-03-24 19:08:02 +0800
committerDavid S. Miller <davem@davemloft.net>2016-03-24 14:33:06 -0400
commit055a94177dfa0bcbf2c4be475fef56bc80c9a233 (patch)
treebe1637da11c471829792c9a1821e81490225c719
parent8d71397bd2021f8ef68ae34d8bea431cc903fcdd (diff)
downloadlinux-055a94177dfa0bcbf2c4be475fef56bc80c9a233.tar.gz
linux-055a94177dfa0bcbf2c4be475fef56bc80c9a233.tar.bz2
linux-055a94177dfa0bcbf2c4be475fef56bc80c9a233.zip
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>
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_ethtool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 9c3ba65988e1..0e7da3f0a564 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -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;