From: Jin Yu Date: Wed, 27 Nov 2019 12:16:58 +0000 (+0800) Subject: examples/vhost_blk: check unused value on init X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1da2925f1994a54fdedb521b205b4ebff146d0df;p=dpdk.git examples/vhost_blk: check unused value on init 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 Reviewed-by: Maxime Coquelin --- diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index 3182a488bb..e1036bf3a6 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);