net/bnxt: fix missed unlock
authorYunjian Wang <wangyunjian@huawei.com>
Wed, 27 May 2020 12:11:20 +0000 (20:11 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 28 May 2020 15:57:07 +0000 (17:57 +0200)
Coverity issue: 357741
Fixes: 02a95625fe9c ("net/bnxt: add flow stats in extended stats")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_stats.c

index cfe1932..8df6922 100644 (file)
@@ -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);