vhost/crypto: fix symmetric ciphering
authorFan Zhang <roy.fan.zhang@intel.com>
Mon, 30 Apr 2018 10:31:17 +0000 (11:31 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:03 +0000 (22:31 +0100)
A bracket was misplaced in a condition check, this patch
fixes it.

Coverity issue: 277232, 277237
Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost_crypto.c

index 7396ddd..04ff8cd 100644 (file)
@@ -675,8 +675,8 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
                        goto error_exit;
                }
                if (unlikely(copy_data(rte_pktmbuf_mtod(m_src, uint8_t *), head,
-                               mem, &desc, cipher->para.src_data_len))
-                               < 0) {
+                               mem, &desc, cipher->para.src_data_len)
+                               < 0)) {
                        ret = VIRTIO_CRYPTO_BADMSG;
                        goto error_exit;
                }