[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1457691622-124657-4-git-send-email-lisheng011@huawei.com>
Date: Fri, 11 Mar 2016 18:20:21 +0800
From: Lisheng <lisheng011@...wei.com>
To: <davem@...emloft.net>
CC: <yisen.zhuang@...wei.com>, <yankejian@...wei.com>,
<xieqianqian@...wei.com>, <huangdaode@...ilicon.com>,
<salil.mehta@...wei.com>, <andriy.shevchenko@...ux.intel.com>,
<netdev@...r.kernel.org>, <haifeng.wei@...wei.com>,
<charles.chenxin@...wei.com>, <linuxarm@...wei.com>
Subject: [PATCH V2 net 3/4] net: hns: bug fix for return values
From: Qianqian Xie <xieqianqian@...wei.com>
The return values in the first two functions mdiobus_write()
are ignored. The patch will fix it.
Signed-off-by: Qianqian Xie <xieqianqian@...wei.com>
---
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 4 ++--
1 file 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 3df2284..cc5c545 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -1000,8 +1000,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;
--
1.9.1
Powered by blists - more mailing lists