summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-06-11 16:31:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-10 14:50:51 +0200
commit877589350269e188cc19563745fd0f6dac14561b (patch)
tree747050088e8ce9612990ee397bf24847a3219cba /drivers/char
parent04aaca197f16aff608e19ee98b1e55f535d746be (diff)
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ttyprintk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index 56db949a7b70..6a0059e508e3 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);