net: hns3: Fix return value error in hns3_reset_notify_down_enet
authorHuazhong Tan <tanhuazhong@huawei.com>
Mon, 16 Jul 2018 15:36:23 +0000 (16:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jul 2018 18:16:44 +0000 (11:16 -0700)
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>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

index c211450bfd781f07c676560d5c1660927b3f2d60..829644665aa865514f7afd25631996d337830d2f 100644 (file)
@@ -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);
 }