From patchwork Wed Jul 24 08:42:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dybkowski, AdamX" X-Patchwork-Id: 56997 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D9841C18E; Wed, 24 Jul 2019 10:46:57 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D0D3C1C13B for ; Wed, 24 Jul 2019 10:46:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2019 01:46:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,302,1559545200"; d="scan'208";a="197427787" Received: from adamdybx-mobl.ger.corp.intel.com (HELO localhost.localdomain) ([10.104.14.184]) by fmsmga002.fm.intel.com with ESMTP; 24 Jul 2019 01:46:53 -0700 From: Adam Dybkowski To: dev@dpdk.org, fiona.trahe@intel.com, shally.verma@caviumnetworks.com Cc: Adam Dybkowski Date: Wed, 24 Jul 2019 10:42:46 +0200 Message-Id: <20190724084246.5768-1-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] compress/zlib: fix coverity warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add missing return after setting the error status in case of invalid flush_flag in the operation. The issue was found by the coverity scan as the fin_flush variable, not initialized in such case, was used later in the flow. CID 340859: Uninitialized variables (UNINIT) Fixes: c7b436ec95fd ("compress/zlib: support burst enqueue/dequeue") Signed-off-by: Adam Dybkowski --- drivers/compress/zlib/zlib_pmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c index 5a4d47d4d..19f9200c2 100644 --- a/drivers/compress/zlib/zlib_pmd.c +++ b/drivers/compress/zlib/zlib_pmd.c @@ -30,6 +30,7 @@ process_zlib_deflate(struct rte_comp_op *op, z_stream *strm) default: op->status = RTE_COMP_OP_STATUS_INVALID_ARGS; ZLIB_PMD_ERR("Invalid flush value\n"); + return; } if (unlikely(!strm)) {