From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0693CA04A4 for ; Wed, 27 May 2020 14:11:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D58551D915; Wed, 27 May 2020 14:11:36 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 65D7E1D8F7; Wed, 27 May 2020 14:11:33 +0200 (CEST) Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4BACECAF2C22BD46A767; Wed, 27 May 2020 20:11:30 +0800 (CST) Received: from localhost (10.173.251.152) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Wed, 27 May 2020 20:11:23 +0800 From: wangyunjian To: CC: , , , , Yunjian Wang , Date: Wed, 27 May 2020 20:11:20 +0800 Message-ID: X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.173.251.152] X-CFilter-Loop: Reflected Subject: [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: fix missed unlock reported by coverity X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Yunjian Wang Coverity issue: 357741 Fixes: 02a95625fe9c ("net/bnxt: add flow stats in extended stats") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang --- drivers/net/bnxt/bnxt_stats.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c index cfe193284..8df6922f5 100644 --- a/drivers/net/bnxt/bnxt_stats.c +++ b/drivers/net/bnxt/bnxt_stats.c @@ -1008,8 +1008,10 @@ int bnxt_flow_stats_req(struct bnxt *bp) } } - if (!in_flow_tbl_cnt) + if (!in_flow_tbl_cnt) { + bnxt_release_flow_lock(bp); goto out; + } rc = bnxt_update_fc_tbl(bp, counter_type, valid_en_tbl, in_flow_tbl_cnt); -- 2.23.0