summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuazhong Tan2018-07-16 17:36:23 +0200
committerDavid S. Miller2018-07-16 20:16:44 +0200
commit6b1385cc251ae9f26b720fa5c8c00bf19af336ae (patch)
tree5e27a89c2842e5b9a74939613214286670c09594
parentnet: hns3: Correct reset event status register (diff)
downloadkernel-qcow2-linux-6b1385cc251ae9f26b720fa5c8c00bf19af336ae.tar.gz
kernel-qcow2-linux-6b1385cc251ae9f26b720fa5c8c00bf19af336ae.tar.xz
kernel-qcow2-linux-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>
-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);
}