Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2515570imm; Mon, 24 Sep 2018 05:46:40 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda6dx+0SCjim8IUQt3y7tWsu/3hIPQ9ibixAsYOT1lQVeRKFoZtk+H9LvRW+yJTX0IS15cZ X-Received: by 2002:a62:c80d:: with SMTP id z13-v6mr8952176pff.176.1537793200271; Mon, 24 Sep 2018 05:46:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537793200; cv=none; d=google.com; s=arc-20160816; b=uiZVsemEGhTN3ZrN1AJJ9psrIVuRiQcFasD+S6ZsMdiqy262UMKaqna+JWTCcIcdB7 1LHJdN8CvX+uYWQB1UQimpQoSkdCUZw3+DGuG3eJYNr0+gQEAZaUot6mKE4NWplZXDsW l3pLztIsykO1qO0dhsBMV58VlWDk5IrRFNnBKSB9HMXmlsShqmShmZoPoXIh9aLRRtdx uApefLdkJ2szfhHBI3N5zh5qefHgJ8s/6r6K8k+2UyHJ47u0IAoakPGSndfYmSYfNxbz kYK7wOCybP+83z3rzhBpCg0sqkvE/qxwXZ4rwculjZ1IKRIiV+BClw3flDAK1nfe4RWr g2OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Lu5nZOnAvV9992cO3/SYmfi8YGv5GXpD9MO+6eAqtPY=; b=EKSI/tlvbK5ktr34ZAbwDwf3RdJ/NmQGEqvVq7ogvnlAkcUPfCNNYgRKgDdzLrCTaB 514jI4hDRwHLX5+ziTvJc1PEn7IGrt0Wx7XvVXaEOGGqryJZB9qMdwoC7PDeYnE1anQQ mQIW1VHl0ee5PhgVyUitPgCgWZwtuwlD5nS9LbRykckfPlwNySml5PDUL8jC4c5NFViD qaQDGZENMyWfda2vnuYwMKfw60ShejxsI/Dwu0CQepfmWvIssXol3GjhG389nkxxFwkX OiD0vDC5SgqS3E5s7vwz8/sB5WeifVjcqpiNjc4NC9NzNV2/U/8LpaYneJpzMVYF9nzY XyiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si34639127pla.473.2018.09.24.05.46.25; Mon, 24 Sep 2018 05:46:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389072AbeIXSqG (ORCPT + 99 others); Mon, 24 Sep 2018 14:46:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59550 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387512AbeIXSqF (ORCPT ); Mon, 24 Sep 2018 14:46:05 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E2B791099; Mon, 24 Sep 2018 12:44:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huazhong Tan , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 172/235] net: hns3: Fix return value error in hns3_reset_notify_down_enet Date: Mon, 24 Sep 2018 13:52:38 +0200 Message-Id: <20180924113122.055272882@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ 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 hip08 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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(s struct net_device *ndev = kinfo->netdev; if (!netif_running(ndev)) - return -EIO; + return 0; return hns3_nic_net_stop(ndev); }