Commit 7e207d85 authored by Wei Yongjun's avatar Wei Yongjun Committed by Herbert Xu

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: 67c2315d ("crypto: caam - add Queue Interface (QI) backend support")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0e93708d
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment