From patchwork Mon Jul 16 15:36:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 142036 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2568596ljj; Mon, 16 Jul 2018 08:37:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfRwLUpV/8N+02iWg83UYgaURoCSXPizK10el4gzCOBUpaXeSwdycW24FsSOvhtXxeu+P8d X-Received: by 2002:a62:201b:: with SMTP id g27-v6mr18519404pfg.253.1531755462415; Mon, 16 Jul 2018 08:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755462; cv=none; d=google.com; s=arc-20160816; b=ToTVUnTil3g1T9EACa43J+9KGT2OarrB8t8nnaONkLd6R97aZrELgIxRP7GImQJ1yR iNuFXmTbCrfSz63PaTfTL0e5f3Lp8HdP5EwagqkyrhUG1jgt3YZOizttHCCgoqQwebbS fC8Vq6eRc3fa0+O3tPjot+lOZyi+PW5VbEBtB8O3pN1CIXXfm9j2S+NE/QRY8+WlcTQG 7Agm+nhU5HgwhRACYKwkYjz7eEXDflKjYlnSahJAJVLSPei50dJ18VzKWPEe+sWM6kmY VWbZ0zG5g5e3+WY2684wDF/OXcBWvEMAgSsXPE9SMiL6iu3Nl3mFvNOP7/6JqnFqLrvI gHAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=bDuOzb9dX0vkZB7cL5PdKl9ZcsToy+tsxhxMmKOKrVg=; b=Nk/dc2pQC/G6bwc9n9/OCBOEi2vNR2Ne2FxQ/1WzucIC8HPPb2KJHRUo9kyU82avh4 B7L1jqTUkuUnH6MSKe3zjAp8mmX9g2/F/owc9bev9dEB5Yx3o4mq6WAcZ05fi1uqEvoD zBzv4vnkpA7gGPjcGgEBj98XkJYe2orZIgrhoSzoFPW0uXZsiAZ4544h7jOwS0qFphgJ tnzDOd5wzgYKjtfziX+1VWeeJSLitXgRBZmaEL8+oOOYvKxgU4dx3vG/aG+dW052t/NZ 6yd4cwZfBUoiBN7B80pa7aGFU1zfHcRTvpk0GtgIXMeMf0eVWCsHTdMMeEJD5MdgMKif yRAA== 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 g12-v6si31332773pll.384.2018.07.16.08.37.42; Mon, 16 Jul 2018 08:37:42 -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 S1731412AbeGPQFh (ORCPT + 31 others); Mon, 16 Jul 2018 12:05:37 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:9679 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727403AbeGPQFh (ORCPT ); Mon, 16 Jul 2018 12:05:37 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1CA63F282CBF7; Mon, 16 Jul 2018 23:37:23 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Mon, 16 Jul 2018 23:37:15 +0800 From: Salil Mehta To: CC: , , , , , , , Huazhong Tan Subject: [PATCH net-next 5/9] net: hns3: Fix return value error in hns3_reset_notify_down_enet Date: Mon, 16 Jul 2018 16:36:23 +0100 Message-ID: <20180716153627.476-6-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180716153627.476-1-salil.mehta@huawei.com> References: <20180716153627.476-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan 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 --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index c211450..8296446 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); }