diff options
author | Weili Qian <qianweili@huawei.com> | 2022-06-09 19:18:19 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-06-17 17:19:20 +0800 |
commit | 00856e5391fbfbe00bf641a39f1bf8d1a144367a (patch) | |
tree | 6ea76804b9d20af33f523d7b829e51267ddba08e /drivers/crypto | |
parent | ce6330f74b08c8cbb2e3c04bd31cbace3de20660 (diff) | |
download | linux-stable-00856e5391fbfbe00bf641a39f1bf8d1a144367a.tar.gz linux-stable-00856e5391fbfbe00bf641a39f1bf8d1a144367a.tar.bz2 linux-stable-00856e5391fbfbe00bf641a39f1bf8d1a144367a.zip |
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 <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/hisilicon/trng/trng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/hisilicon/trng/trng.c b/drivers/crypto/hisilicon/trng/trng.c index 829f2caf0f67..97e500db0a82 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); |