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 6B484A04DE; Wed, 27 Nov 2019 05:34:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B25C34C99; Wed, 27 Nov 2019 05:34:51 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A4E1F2B88; Wed, 27 Nov 2019 05:34:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2019 20:34:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,248,1571727600"; d="scan'208";a="211641641" Received: from storage36.sh.intel.com ([10.67.110.177]) by orsmga006.jf.intel.com with ESMTP; 26 Nov 2019 20:34:46 -0800 From: Jin Yu To: Maxime Coquelin , Tiwei Bie , Zhihong Wang Cc: dev@dpdk.org, Jin Yu , stable@dpdk.org Date: Wed, 27 Nov 2019 20:16:58 +0800 Message-Id: <20191127121659.51709-1-jin.yu@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20191126153716.8240-1-jin.yu@intel.com> References: <20191126153716.8240-1-jin.yu@intel.com> Subject: [dpdk-dev] [PATCH v2] vhost-blk: fix the unused return value 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 the assert to handle error. Coverity issue: 350592 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: stable@dpdk.org Signed-off-by: Jin Yu --- v2 - add the error hander --- examples/vhost_blk/vhost_blk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index 3182a488b..e1036bf3a 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -856,6 +856,7 @@ new_device(int vid) ctrlr->bdev->vid, i, &blk_vq->last_avail_idx, &blk_vq->last_used_idx); + assert(ret == 0); blk_vq->avail_wrap_counter = blk_vq->last_avail_idx & (1 << 15); -- 2.17.2