Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7116333imm; Wed, 27 Jun 2018 20:46:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdOz6Kh4HsIQnhwrNLne6A68oMzkOQv5QnOYXjDKxAKpdjOJkgrjtiDrkp/ZAaYMMwVWEOW X-Received: by 2002:a62:1d97:: with SMTP id d145-v6mr8541896pfd.101.1530157579044; Wed, 27 Jun 2018 20:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530157579; cv=none; d=google.com; s=arc-20160816; b=pdPNvF/C4VKbRnDCk5mOwsemK4C9s1NL44Hk3PMkpQu3eSMCOTgS9+l2HeDzAGuvM/ 1vviJwiNbr7/O33KaGCrUq3ZxrRBmPJM9ZDNvaB1Ot5asnm4JZ7Oo4A0yqbs0mAmy88h 8taG/M0BW3v26qiWFPtSOzHNh7WA1nBNNCphgOJBMpZuOvzegbRJnmuqh3jjfr8kGHQx meY3EWLoUZmyzRsUVEsrLCdV6+GJsU/f040m5BB98spVJWsIyuMovLanxhyX63ZaDsMk DDARIlgEgtG9qlKvoqjqZmLJ40hf6tGkMjHyG8dxyxoEXD8uKAptmNhpKUUT/oIO/e7F dvZw== 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=1A9+uEZpN49JsB+gyRS27w3i0LT3QqxrqWKni5NG1xI=; b=KdK8CzXXd2Bd7D3mG3um87H1Bg0I8+PmygMEvpky6uAq6SwezAvJi1/4sMsY65A4uR csG3VNX7K7F2wDvNU6f94lBcBDK6yswoM1j6Y6OQwhElIIHkhbeUOzO43/FhvGXQsR++ kfL0keuqFCc234Kteb10FEYp++8HkrCoqzKNxqWeSxO9BqDsHln2SyRzpmSPP7kM9Tjd XFFgWIgmx3Txow2Bt0FI+FGj0RHmAUjcXO51Sk7TUZJT6pYmJHca784GFTuIpcWgzdUm SpM0TZsqNQ9eRDAXoqWDBk3dwl91YHNwGEXb+a/ZHcO8XcLIhQkeAwwvPxafKeAbtl4Z IK0A== 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 q19-v6si4960999pgq.71.2018.06.27.20.46.05; Wed, 27 Jun 2018 20:46:19 -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 S1752461AbeF1DlJ (ORCPT + 99 others); Wed, 27 Jun 2018 23:41:09 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52487 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751072AbeF1DlH (ORCPT ); Wed, 27 Jun 2018 23:41:07 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 75741943774CA; Thu, 28 Jun 2018 11:41:02 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.382.0; Thu, 28 Jun 2018 11:40:54 +0800 From: Peng Li To: CC: , , , , , Subject: [PATCH net-next 09/11] net: hns3: remove the Redundant put_vector in hns3_client_uninit Date: Thu, 28 Jun 2018 12:12:27 +0800 Message-ID: <1530159149-122284-10-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530159149-122284-1-git-send-email-lipeng321@huawei.com> References: <1530159149-122284-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The interface h->ae_algo->ops->put_vector is called in both hns3_nic_dealloc_vector_data and hns3_nic_uninit_vector_data in hns3_client_uninit, this will cause vector freed twice. This patch remove the Redundant put_vector to make vector freed only once. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 1a68952..beca364 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -2745,10 +2745,6 @@ static int hns3_nic_uninit_vector_data(struct hns3_nic_priv *priv) if (ret) return ret; - ret = h->ae_algo->ops->put_vector(h, tqp_vector->vector_irq); - if (ret) - return ret; - hns3_free_vector_ring_chain(tqp_vector, &vector_ring_chain); if (priv->tqp_vector[i].irq_init_flag == HNS3_VECTOR_INITED) { -- 2.9.3