examples/vhost_blk: check unused value on init
Add the assert to handle error.
Coverity issue: 350592
Fixes: c19beb3f38
("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
fdf69a8179
commit
1da2925f19
@ -856,6 +856,7 @@ new_device(int vid)
|
|||||||
ctrlr->bdev->vid, i,
|
ctrlr->bdev->vid, i,
|
||||||
&blk_vq->last_avail_idx,
|
&blk_vq->last_avail_idx,
|
||||||
&blk_vq->last_used_idx);
|
&blk_vq->last_used_idx);
|
||||||
|
assert(ret == 0);
|
||||||
|
|
||||||
blk_vq->avail_wrap_counter = blk_vq->last_avail_idx &
|
blk_vq->avail_wrap_counter = blk_vq->last_avail_idx &
|
||||||
(1 << 15);
|
(1 << 15);
|
||||||
|
Loading…
Reference in New Issue
Block a user