From: Dan Carpenter Date: Tue, 5 Dec 2017 14:37:17 +0000 (+0300) Subject: staging: ccree: Uninitialized return in ssi_ahash_import() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5be88596c7b04b896a231d81d97948adb890a018;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: ccree: Uninitialized return in ssi_ahash_import() [ Upstream commit aece09024414b54158e03aa45f4a4436e7cb996c ] The return value isn't initialized on some success paths. Fixes: c5f39d07860c ("staging: ccree: fix leak of import() after init()") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index f72ca485c86f..e266a70a1b32 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -1781,7 +1781,7 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in) struct device *dev = &ctx->drvdata->plat_dev->dev; struct ahash_req_ctx *state = ahash_request_ctx(req); u32 tmp; - int rc; + int rc = 0; memcpy(&tmp, in, sizeof(u32)); if (tmp != CC_EXPORT_MAGIC) {