diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-06-11 18:31:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-10 15:50:51 +0300 |
commit | 877589350269e188cc19563745fd0f6dac14561b (patch) | |
tree | 747050088e8ce9612990ee397bf24847a3219cba /drivers/char | |
parent | 04aaca197f16aff608e19ee98b1e55f535d746be (diff) | |
download | linux-877589350269e188cc19563745fd0f6dac14561b.tar.xz |
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.c | 2 |
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); |