Skip to content

Commit 4564570

Browse files
Colin Ian Kingherbertx
authored andcommitted
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 054a554 commit 4564570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/char/hw_random/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ EXPORT_SYMBOL_GPL(devm_hwrng_unregister);
611611

612612
static int __init hwrng_modinit(void)
613613
{
614-
int ret = -ENOMEM;
614+
int ret;
615615

616616
/* kmalloc makes this safe for virt_to_page() in virtio_rng.c */
617617
rng_buffer = kmalloc(rng_buffer_size(), GFP_KERNEL);

0 commit comments

Comments
 (0)