aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon
diff options
context:
space:
mode:
authorHuazhong Tan <tanhuazhong@huawei.com>2018-07-16 16:36:23 +0100
committerDavid S. Miller <davem@davemloft.net>2018-07-16 11:16:44 -0700
commit6b1385cc251ae9f26b720fa5c8c00bf19af336ae (patch)
tree5e27a89c2842e5b9a74939613214286670c09594 /drivers/net/ethernet/hisilicon
parentnet: hns3: Correct reset event status register (diff)
downloadlinux-dev-6b1385cc251ae9f26b720fa5c8c00bf19af336ae.tar.xz
linux-dev-6b1385cc251ae9f26b720fa5c8c00bf19af336ae.zip
net: hns3: Fix return value error in hns3_reset_notify_down_enet
When doing reset, netdev has not been brought up is not an error, it means that we do not need do the stop operation, so just return zero. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index c211450bfd78..829644665aa8 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3396,7 +3396,7 @@ static int hns3_reset_notify_down_enet(struct hnae3_handle *handle)
struct net_device *ndev = kinfo->netdev;
if (!netif_running(ndev))
- return -EIO;
+ return 0;
return hns3_nic_net_stop(ndev);
}