mirror of https://gitee.com/openkylin/linux.git
crypto: mediatek - don't return garbage err on successful return
In the case where keylen <= bs mtk_sha_setkey returns an uninitialized return value in err. Fix this by returning 0 instead of err. Issue detected by static analysis with cppcheck. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
012ef70336
commit
f283148a07
|
@ -878,7 +878,7 @@ static int mtk_sha_setkey(struct crypto_ahash *tfm,
|
|||
bctx->opad[i] ^= 0x5c;
|
||||
}
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mtk_sha_export(struct ahash_request *req, void *out)
|
||||
|
|
Loading…
Reference in New Issue