From: Yisen Zhuang <Yisen.Zhuang@huawei.com>
To: <davem@davemloft.net>
Cc: <yankejian@huawei.com>, <huangdaode@hisilicon.com>,
<salil.mehta@huawei.com>, <lisheng011@huawei.com>,
<lipeng321@huawei.com>, <liguozhu@huawei.com>,
<xieqianqian@huawei.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>
Subject: [PATCH net 3/7] net: hns: bug fix for return values
Date: Thu, 24 Mar 2016 19:08:02 +0800 [thread overview]
Message-ID: <1458817686-159708-4-git-send-email-Yisen.Zhuang@huawei.com> (raw)
In-Reply-To: <1458817686-159708-1-git-send-email-Yisen.Zhuang@huawei.com>
From: Qianqian Xie <xieqianqian@huawei.com>
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>
---
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 9c3ba65..0e7da3f 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;
--
1.9.1
next prev parent reply other threads:[~2016-03-24 10:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 11:07 [PATCH net 0/7] net: hns: fix some bugs in HNS driver Yisen Zhuang
2016-03-24 11:08 ` [PATCH net 1/7] net: hns: fix a bug for cycle index Yisen Zhuang
2016-03-24 11:08 ` [PATCH net 2/7] net: hns: optimizate fmt of snprintf() Yisen Zhuang
2016-03-24 11:08 ` Yisen Zhuang [this message]
2016-03-24 11:08 ` [PATCH net 4/7] net: hns: remove useless variable assignment and comment Yisen Zhuang
2016-03-24 11:08 ` [PATCH net 5/7] net: hns: optimizate irq proccess for HNS V2 Yisen Zhuang
2016-03-24 11:08 ` [PATCH net 6/7] net: hns: fix warning of passing zero to 'PTR_ERR' Yisen Zhuang
2016-03-24 11:08 ` [PATCH net 7/7] net: hns: bug fix about getting hilink status for HNS v2 Yisen Zhuang
2016-03-24 18:33 ` [PATCH net 0/7] net: hns: fix some bugs in HNS driver David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458817686-159708-4-git-send-email-Yisen.Zhuang@huawei.com \
--to=yisen.zhuang@huawei.com \
--cc=davem@davemloft.net \
--cc=huangdaode@hisilicon.com \
--cc=liguozhu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=lisheng011@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=xieqianqian@huawei.com \
--cc=yankejian@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).