From: Dan Carpenter Date: Fri, 17 Jun 2016 09:16:19 +0000 (+0300) Subject: crypto: drbg - fix an error code in drbg_init_sym_kernel() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01ac94580ac2f7076394212ca963da7409016796;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git crypto: drbg - fix an error code in drbg_init_sym_kernel() We accidentally return PTR_ERR(NULL) which is success but we should return -ENOMEM. Fixes: 355912852115 ('crypto: drbg - use CTR AES instead of ECB AES') Signed-off-by: Dan Carpenter Acked-by: Stephan Mueller Signed-off-by: Herbert Xu --- diff --git a/crypto/drbg.c b/crypto/drbg.c index 8b39f509f0a6..f752da3a7c75 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1686,7 +1686,7 @@ static int drbg_init_sym_kernel(struct drbg_state *drbg) if (!req) { pr_info("DRBG: could not allocate request queue\n"); drbg_fini_sym_kernel(drbg); - return PTR_ERR(req); + return -ENOMEM; } drbg->ctr_req = req; skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,