]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: amlogic - ensure error variable err is set before returning it
authorColin Ian King <colin.king@canonical.com>
Tue, 29 Oct 2019 11:32:30 +0000 (11:32 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Nov 2019 15:00:46 +0000 (23:00 +0800)
commit5371b7700ab493846a230ae5ed553dc211452db3
treeda7f561c92a307d680f0c5ebc0476c50aea39f72
parentb196364e729cf1343c0ba5c94fce7fdbf22e1de1
crypto: amlogic - ensure error variable err is set before returning it

Currently when the call to crypto_engine_alloc_init fails the error
return path returns an uninitialized value in the variable err. Fix
this by setting err to -ENOMEM.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 0e9a1b234cc7 ("crypto: amlogic - Add crypto accelerator for amlogic GXL")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/amlogic/amlogic-gxl-core.c