Check zero-length input, for skcipher algorithm, to solve the extra
tests. This is a valid operation, therefore the API will return no error.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        u32 *desc;
        int ret = 0;
 
+       if (!req->cryptlen)
+               return 0;
+
        /* allocate extended descriptor */
        edesc = skcipher_edesc_alloc(req, DESC_JOB_IO_LEN * CAAM_CMD_SZ);
        if (IS_ERR(edesc))
        u32 *desc;
        int ret = 0;
 
+       if (!req->cryptlen)
+               return 0;
+
        /* allocate extended descriptor */
        edesc = skcipher_edesc_alloc(req, DESC_JOB_IO_LEN * CAAM_CMD_SZ);
        if (IS_ERR(edesc))
 
        struct caam_ctx *ctx = crypto_skcipher_ctx(skcipher);
        int ret;
 
+       if (!req->cryptlen)
+               return 0;
+
        if (unlikely(caam_congested))
                return -EAGAIN;
 
 
        struct caam_request *caam_req = skcipher_request_ctx(req);
        int ret;
 
+       if (!req->cryptlen)
+               return 0;
+
        /* allocate extended descriptor */
        edesc = skcipher_edesc_alloc(req);
        if (IS_ERR(edesc))
        struct caam_request *caam_req = skcipher_request_ctx(req);
        int ret;
 
+       if (!req->cryptlen)
+               return 0;
        /* allocate extended descriptor */
        edesc = skcipher_edesc_alloc(req);
        if (IS_ERR(edesc))