Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2476377imm; Mon, 16 Jul 2018 08:38:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd291hKohQw3OpiEtDePadNMczmR9LBK2DFXjTYWMHOs/VpKRKDfSPjsRBhK9z2n697uXzv X-Received: by 2002:a63:41c6:: with SMTP id o189-v6mr16237977pga.323.1531755519779; Mon, 16 Jul 2018 08:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755519; cv=none; d=google.com; s=arc-20160816; b=aK2SbboAwy3XQWJEbNRoWStmdKEeZl7h50i7g9e5XiFG3Ie5cHZZKGlww6ccPgfSjc k82DMEcxamgzRtKUdzhDH2bNXMMT19LhpefIcHY0rJTmEzvYumPAH3tB4s3BYr9eLseb bAbw7MlpWyj9B7LXDDgByxGeDdH5KhUYz8mhTJjI4eRdBPqMI3BO+NPyHmS25+gCfbPC P9fDYT5rRmjyA96SXluZsFRAztSeH38e655jK7cNxlP0uDc5C3Q3Y1zHXZPXV49Gg4j0 OHzJS9fsiYw51t8g3a623jRW1NylVPY3bUnP3+GRqOVZxVUH+e64jv6ECYQv6LfD71jP vK2w== 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 p9-v6si11510363pgk.645.2018.07.16.08.38.24; Mon, 16 Jul 2018 08:38:39 -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 S1731391AbeGPQFh (ORCPT + 99 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 Content-Type: text/plain 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(-) 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); } -- 2.7.4