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>
This commit is contained in:
Colin Ian King 2020-07-24 11:10:01 +01:00 коммит произвёл Herbert Xu
Родитель 054a5540fb
Коммит 4564570970
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -611,7 +611,7 @@ EXPORT_SYMBOL_GPL(devm_hwrng_unregister);
static int __init hwrng_modinit(void) static int __init hwrng_modinit(void)
{ {
int ret = -ENOMEM; int ret;
/* kmalloc makes this safe for virt_to_page() in virtio_rng.c */ /* kmalloc makes this safe for virt_to_page() in virtio_rng.c */
rng_buffer = kmalloc(rng_buffer_size(), GFP_KERNEL); rng_buffer = kmalloc(rng_buffer_size(), GFP_KERNEL);