diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-07-24 13:10:01 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-07-31 11:25:29 +0300 |
commit | 45645709704f94d2625ef15fbf7bcae51aeab975 (patch) | |
tree | 62d5eff58f1d2a3dd5fbc82fffdb2e25fee3415d | |
parent | 054a5540fb8f7268e2c79e9deab4242db15c8cba (diff) | |
download | linux-45645709704f94d2625ef15fbf7bcae51aeab975.tar.xz |
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>
-rw-r--r-- | drivers/char/hw_random/core.c | 2 |
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); |