From: Fan Zhang Date: Wed, 15 May 2019 16:19:48 +0000 (+0100) Subject: vhost/crypto: fix logically dead code X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1a92c9632bf8106dbf5afd0df159612cee7f6b76;p=dpdk.git vhost/crypto: fix logically dead code This patch fixes a few same class bugs that causes the logically dead code in vhost_crypto. Coverity issue: 277236, 277233, 277220, 277214 Fixes: 3bb595ecd682 ("vhost/crypto: add request handler") Cc: stable@dpdk.org Signed-off-by: Fan Zhang Acked-by: Marko Kovacevic Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index 0edf12d528..069b561087 100644 --- a/lib/librte_vhost/vhost_crypto.c +++ b/lib/librte_vhost/vhost_crypto.c @@ -1024,7 +1024,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, } if (unlikely(copy_data(rte_pktmbuf_mtod(m_src, uint8_t *), vc_req, &desc, chain->para.src_data_len, - nb_descs, vq_size)) < 0) { + nb_descs, vq_size) < 0)) { ret = VIRTIO_CRYPTO_BADMSG; goto error_exit; } @@ -1598,7 +1598,7 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid, op->sym->m_dst->data_off = 0; if (unlikely(vhost_crypto_process_one_req(vcrypto, vq, - op, head, desc_idx)) < 0) + op, head, desc_idx) < 0)) break; }