From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam01on0094.outbound.protection.outlook.com ([104.47.34.94]:11650 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728273AbeIOGr1 (ORCPT ); Sat, 15 Sep 2018 02:47:27 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Huazhong Tan , Peng Li , Salil Mehta , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.18 29/92] net: hns3: Fix return value error in hns3_reset_notify_down_enet Date: Sat, 15 Sep 2018 01:30:10 +0000 Message-ID: <20180915012944.179481-29-alexander.levin@microsoft.com> References: <20180915012944.179481-1-alexander.levin@microsoft.com> In-Reply-To: <20180915012944.179481-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Huazhong Tan [ Upstream commit 6b1385cc251ae9f26b720fa5c8c00bf19af336ae ] 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 hi= p08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/= ethernet/hisilicon/hns3/hns3_enet.c index bcec3a779407..9d69621f5ab4 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3422,7 +3422,7 @@ static int hns3_reset_notify_down_enet(struct hnae3_h= andle *handle) struct net_device *ndev =3D kinfo->netdev; =20 if (!netif_running(ndev)) - return -EIO; + return 0; =20 return hns3_nic_net_stop(ndev); } --=20 2.17.1