summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-07-24 12:10:01 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-07-31 10:25:29 +0200
commit45645709704f94d2625ef15fbf7bcae51aeab975 (patch)
tree62d5eff58f1d2a3dd5fbc82fffdb2e25fee3415d /drivers/char
parentcrypto: x86/curve25519 - Remove unused carry variables (diff)
downloadlinux-45645709704f94d2625ef15fbf7bcae51aeab975.tar.xz
linux-45645709704f94d2625ef15fbf7bcae51aeab975.zip
hwrng: core - remove redundant initialization of variable ret
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index d2d7a42d7e0d..8c1c47dd9f46 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -611,7 +611,7 @@ EXPORT_SYMBOL_GPL(devm_hwrng_unregister);
static int __init hwrng_modinit(void)
{
- int ret = -ENOMEM;
+ int ret;
/* kmalloc makes this safe for virt_to_page() in virtio_rng.c */
rng_buffer = kmalloc(rng_buffer_size(), GFP_KERNEL);