]> git.droids-corp.org - dpdk.git/blobdiff - drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
event/octeontx2: fix crypto adapter queue pair operations
[dpdk.git] / drivers / crypto / dpaa2_sec / dpaa2_sec_dpseci.c
index cab79db3dc2c6d24d664c24113ca2257ed976706..05b194ccff8a58d9d39d09fb9c4cdc167715f09b 100644 (file)
@@ -1842,7 +1842,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev,
        session->ctxt_type = DPAA2_SEC_CIPHER;
        session->cipher_key.data = rte_zmalloc(NULL, xform->cipher.key.length,
                        RTE_CACHE_LINE_SIZE);
-       if (session->cipher_key.data == NULL) {
+       if (session->cipher_key.data == NULL && xform->cipher.key.length > 0) {
                DPAA2_SEC_ERR("No Memory for cipher key");
                rte_free(priv);
                return -ENOMEM;