git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdf69a8
)
examples/vhost_blk: check unused value on init
author
Jin Yu
<jin.yu@intel.com>
Wed, 27 Nov 2019 12:16:58 +0000
(20:16 +0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:01 +0000
(19:46 +0100)
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 <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
examples/vhost_blk/vhost_blk.c
patch
|
blob
|
history
diff --git
a/examples/vhost_blk/vhost_blk.c
b/examples/vhost_blk/vhost_blk.c
index
3182a48
..
e1036bf
100644
(file)
--- 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);