diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-04-11 16:04:09 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:51 (GMT) |
commit | 70482d75b8c8eee9f3e4328e3c50afb01ee803f8 (patch) | |
tree | c75b7dfbdd6838cc3111caf1f2da66717f3333e7 | |
parent | 6ce082a942f39a7f66c583879d14d456076341f8 (diff) | |
download | linux-70482d75b8c8eee9f3e4328e3c50afb01ee803f8.tar.xz |
crypto: caam - fix error return code in caam_qi_init()
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 <weiyongjun1@huawei.com>
Acked-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 7e207d8550644c1076ceb070f40abf52701253ec)
-rw-r--r-- | drivers/crypto/caam/qi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 0661b0d..35e05da 100644 --- a/drivers/crypto/caam/qi.c +++ b/drivers/crypto/caam/qi.c @@ -788,7 +788,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 */ |