From: Weili Qian Date: Thu, 9 Jun 2022 11:18:19 +0000 (+0800) Subject: crypto: hisilicon/trng - fix local variable type X-Git-Tag: v6.1-rc5~754^2~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00856e5391fbfbe00bf641a39f1bf8d1a144367a;p=platform%2Fkernel%2Flinux-starfive.git crypto: hisilicon/trng - fix local variable type The return value of 'readl_poll_timeout' is '0' or '-ETIMEDOUT'. Therefore, change the local variable 'ret' type from 'u32' to 'int'. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/hisilicon/trng/trng.c b/drivers/crypto/hisilicon/trng/trng.c index 829f2ca..97e500d 100644 --- a/drivers/crypto/hisilicon/trng/trng.c +++ b/drivers/crypto/hisilicon/trng/trng.c @@ -185,7 +185,7 @@ static int hisi_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait) struct hisi_trng *trng; int currsize = 0; u32 val = 0; - u32 ret; + int ret; trng = container_of(rng, struct hisi_trng, rng);