summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/omap-aes.c
diff options
context:
space:
mode:
authorWei Yongjun2016-09-15 05:27:32 +0200
committerHerbert Xu2016-09-22 12:27:35 +0200
commitc98ef8dbca18db133bb4bc7643b975ee2612be2f (patch)
tree46ff4fa7a6c2337027d5b8b2230a928acb1b0597 /drivers/crypto/omap-aes.c
parentcrypto: omap-des - fix error return code in omap_des_probe() (diff)
downloadkernel-qcow2-linux-c98ef8dbca18db133bb4bc7643b975ee2612be2f.tar.gz
kernel-qcow2-linux-c98ef8dbca18db133bb4bc7643b975ee2612be2f.tar.xz
kernel-qcow2-linux-c98ef8dbca18db133bb4bc7643b975ee2612be2f.zip
crypto: omap-aes - fix error return code in omap_aes_probe()
Fix to return error code -ENOMEM from the crypto_engine_alloc_init() error handling case instead of 0, as done elsewhere in this function. Fixes: 0529900a01cb ("crypto: omap-aes - Support crypto engine framework") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/omap-aes.c')
-rw-r--r--drivers/crypto/omap-aes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 2033769e8381..fe32dd95ae4f 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -1215,8 +1215,10 @@ static int omap_aes_probe(struct platform_device *pdev)
/* Initialize crypto engine */
dd->engine = crypto_engine_alloc_init(dev, 1);
- if (!dd->engine)
+ if (!dd->engine) {
+ err = -ENOMEM;
goto err_engine;
+ }
dd->engine->prepare_cipher_request = omap_aes_prepare_req;
dd->engine->cipher_one_request = omap_aes_crypt_req;