From 7e207d8550644c1076ceb070f40abf52701253ec Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 11 Apr 2017 16:04:09 +0000 Subject: [PATCH] crypto: caam - fix error return code in caam_qi_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix to return error code -ENOMEM from the kmem_cache_create() error handling case instead of 0(err is 0 here), as done elsewhere in this function. Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support") Signed-off-by: Wei Yongjun Acked-by: Horia Geantă Signed-off-by: Herbert Xu --- drivers/crypto/caam/qi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 45de8fd87774..1990ed460c46 100644 --- a/drivers/crypto/caam/qi.c +++ b/drivers/crypto/caam/qi.c @@ -789,7 +789,7 @@ int caam_qi_init(struct platform_device *caam_pdev) dev_err(qidev, "Can't allocate CAAM cache\n"); free_rsp_fqs(); platform_device_unregister(qi_pdev); - return err; + return -ENOMEM; } /* Done with the CGRs; restore the cpus allowed mask */