From: Colin Ian King Date: Thu, 11 Jun 2020 15:31:08 +0000 (+0100) Subject: ttyprintk: remove redundant initialization of variable ret X-Git-Tag: v5.15~3208^2~108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=877589350269e188cc19563745fd0f6dac14561b;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/20200611153108.927614-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c index 56db949..6a0059e 100644 --- a/drivers/char/ttyprintk.c +++ b/drivers/char/ttyprintk.c @@ -172,7 +172,7 @@ static struct tty_driver *ttyprintk_driver; static int __init ttyprintk_init(void) { - int ret = -ENOMEM; + int ret; spin_lock_init(&tpk_port.spinlock);