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: 76ad4f0ee7 ("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>
This commit is contained in:
Huazhong Tan 2018-07-16 16:36:23 +01:00 committed by David S. Miller
parent 9ca8d1a73c
commit 6b1385cc25

View File

@ -3396,7 +3396,7 @@ static int hns3_reset_notify_down_enet(struct hnae3_handle *handle)
struct net_device *ndev = kinfo->netdev; struct net_device *ndev = kinfo->netdev;
if (!netif_running(ndev)) if (!netif_running(ndev))
return -EIO; return 0;
return hns3_nic_net_stop(ndev); return hns3_nic_net_stop(ndev);
} }