From: Wei Yongjun Date: Thu, 15 Sep 2016 03:27:15 +0000 (+0000) Subject: crypto: omap-des - fix error return code in omap_des_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=59af156625ab1d11436b04806ee3c1c795b29a93;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git crypto: omap-des - fix error return code in omap_des_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: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto engine framework") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 2b20d960caa8..a6f65532fd16 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -1081,8 +1081,10 @@ static int omap_des_probe(struct platform_device *pdev) /* Initialize des 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_des_prepare_req; dd->engine->cipher_one_request = omap_des_crypt_req;