vhost-blk: delete the unused return value

Message ID 20191126153716.8240-1-jin.yu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series vhost-blk: delete the unused return value |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-compilation fail Compilie Testing issues
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Jin Yu Nov. 26, 2019, 3:37 p.m. UTC
  Coverity issue: 350592
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

Signed-off-by: Jin Yu <jin.yu@intel.com>
---
 examples/vhost_blk/vhost_blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Maxime Coquelin Nov. 26, 2019, 2:58 p.m. UTC | #1
On 11/26/19 4:37 PM, Jin Yu wrote:
> Coverity issue: 350592
> Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jin Yu <jin.yu@intel.com>
> ---
>  examples/vhost_blk/vhost_blk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
> index 3182a488b..ff2f138b3 100644
> --- a/examples/vhost_blk/vhost_blk.c
> +++ b/examples/vhost_blk/vhost_blk.c
> @@ -852,7 +852,7 @@ new_device(int vid)
>  
>  		if (ctrlr->packed_ring) {
>  			/* for the reconnection */
> -			ret = rte_vhost_get_vring_base_from_inflight(
> +			rte_vhost_get_vring_base_from_inflight(
>  				ctrlr->bdev->vid, i,
>  				&blk_vq->last_avail_idx,
>  				&blk_vq->last_used_idx);
> 

It may be safer to handle the error, isn't it?

Maxime
  

Patch

diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 3182a488b..ff2f138b3 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -852,7 +852,7 @@  new_device(int vid)
 
 		if (ctrlr->packed_ring) {
 			/* for the reconnection */
-			ret = rte_vhost_get_vring_base_from_inflight(
+			rte_vhost_get_vring_base_from_inflight(
 				ctrlr->bdev->vid, i,
 				&blk_vq->last_avail_idx,
 				&blk_vq->last_used_idx);