Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ttyprintk: 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>
Link: https://lore.kernel.org/r/20200611153108.927614-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Colin Ian King and committed by
Greg Kroah-Hartman
87758935 04aaca19

+1 -1
+1 -1
drivers/char/ttyprintk.c
··· 172 172 173 173 static int __init ttyprintk_init(void) 174 174 { 175 - int ret = -ENOMEM; 175 + int ret; 176 176 177 177 spin_lock_init(&tpk_port.spinlock); 178 178