Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3924922pxb; Tue, 2 Mar 2021 02:00:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKh7yifKEEi5BAH5mft4rqkqnMwhjb8zCbl+ERf8LZtP77XvJLYE9hlHJBGTT6itHdch/z X-Received: by 2002:a17:906:cd05:: with SMTP id oz5mr13479706ejb.345.1614679205934; Tue, 02 Mar 2021 02:00:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614679205; cv=none; d=google.com; s=arc-20160816; b=ngp6eqPRyXUYXZgKfU3l0jdqZffYiu/ADj22qUnmOJ9i7XT/cG1SX5ggLnK+ZO8Hye mRfZaKAqfbWIZLtndEGfqXHI6zcYQpE6RiSWTSxpgHJjIMRQEbDQUfdwoxI5g+/oN29Y lyP0m79zbTMlWIB45tXxRirNFkEXeCO2EdQEPhX174/NLfoDcfcKqyGqxp6unVfK5EPb RIc0T2E+r6dDMKWm2xVFdJLG80OWDX6ZG8O5H/bHzYyoyXtLVJjGx7o3jT8N+r18WWqY wglAgye2Iz8Z/SwtBcEdrnLj1Fu1LzcXPMyYjgWQp8F2uVWtfBimQZJ2bp6yHBGFd8YV lHcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3ubzCCGsx8N6el0Cul0QRrzdn+SXdmghC9Hm/XNKXM4=; b=haxDc1PzoRTk+oBH+VrQ5LoRffDtu1H2T8jsNDp5BAmmFXEaPmviHsuLVDtsRt7DNK zCVQkNxzr9QzB3ePl9t4fvAlqseIsaZ2WhH75IfjzMY1zF8XwGrJWsQ+PF3ZmrRA1mSZ naGZ9nB22MgEqI+hQZ8e9tFjiekGd5DYrbczNsdp6PFzCojofLFNgZLpXHCYTWKR344T Vhevt5YhFc9jU+R7nU7KswF9k3KWBP4wzAW264pxtNmqCvDO7lHnfcr+Qr+9InM2JyVG PJ1J/g28LbKzYypm/dYkzGN1dOtXiztW8rwDxppumL5+EtKByRpDdDHQgJSmN+fhX+Yz mCFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MYi7JDaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si2957530edn.284.2021.03.02.01.59.43; Tue, 02 Mar 2021 02:00:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MYi7JDaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379280AbhCBB1b (ORCPT + 99 others); Mon, 1 Mar 2021 20:27:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:42626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241278AbhCATNP (ORCPT ); Mon, 1 Mar 2021 14:13:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 16B0B651E9; Mon, 1 Mar 2021 17:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619169; bh=x0kc4nVTBK3rfYln+UrnvXTFmE6PYnWeXN3lGmrC7JU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MYi7JDafhnn/ZTI0tw2Wa992exOdMrXGf1Zg1KeIxyJMywLMhx7Cc6kxfhd+oKaVA qH/27O4/Br6N4N+HB0uKFdNwglHGdjUqjqRlJH94gQkQDW41YNgGINBRuOXsw1f1QS joCtS1sKdssvXhS10UhvgxWqqrzN6fazfROTndPs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wenpeng Liang , Weihang Li , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.10 356/663] RDMA/hns: Fixed wrong judgments in the goto branch Date: Mon, 1 Mar 2021 17:10:04 +0100 Message-Id: <20210301161159.471356833@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wenpeng Liang [ Upstream commit bb74fe7e81c8b2b65c6a351a247fdb9a969cbaec ] When an error occurs, the qp_table must be cleared, regardless of whether the SRQ feature is enabled. Fixes: 5c1f167af112 ("RDMA/hns: Init SRQ table for hip08") Link: https://lore.kernel.org/r/1611997090-48820-5-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index ae721fa61e0e4..ba65823a5c0bb 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c @@ -781,8 +781,7 @@ static int hns_roce_setup_hca(struct hns_roce_dev *hr_dev) return 0; err_qp_table_free: - if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) - hns_roce_cleanup_qp_table(hr_dev); + hns_roce_cleanup_qp_table(hr_dev); err_cq_table_free: hns_roce_cleanup_cq_table(hr_dev); -- 2.27.0