[PATCH] crypto: Fix return value check in aead_crypt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix passing zero to 'PTR_ERR' warning

Signed-off-by: Wang Qing <wangqing@xxxxxxxx>
---
 drivers/crypto/caam/caamalg_qi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c
index 66f60d7..add60e8
--- a/drivers/crypto/caam/caamalg_qi.c
+++ b/drivers/crypto/caam/caamalg_qi.c
@@ -1166,7 +1166,7 @@ static inline int aead_crypt(struct aead_request *req, bool encrypt)
 	/* allocate extended descriptor */
 	edesc = aead_edesc_alloc(req, encrypt);
 	if (IS_ERR_OR_NULL(edesc))
-		return PTR_ERR(edesc);
+		return PTR_ERR_OR_ZERO(edesc);
 
 	/* Create and submit job descriptor */
 	ret = caam_qi_enqueue(ctx->qidev, &edesc->drv_req);
-- 
2.7.4




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux