crypto: sun8i-ce - fix error return code in sun8i_ce_prng_generate()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Fri, 5 Mar 2021 01:57:17 +0000 (17:57 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 12 Mar 2021 13:04:04 +0000 (00:04 +1100)
commit282894556b8349d3c095eedadc4dde9495d48445
treeb8054acc9fa1aca76ba8369d594a56057613eae0
parent90274769cf7926a7a14f1cd3f47b66de76e0adb4
crypto: sun8i-ce - fix error return code in sun8i_ce_prng_generate()

When dma_mapping_error() returns an error, no error return code of
sun8i_ce_prng_generate() is assigned.
To fix this bug, err is assigned with -EFAULT as error return code.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c