summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-05-18 19:21:26 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-27 14:19:50 +0200
commit18c092e5c35ece7fa1fe0b2c6f8c4a13da3fc641 (patch)
treecf00f5efdaefbed0693e0c54d283c484377d0675
parent2ac62268a2c0f2ffafc19a7ced6972a9b1330389 (diff)
ttyprintk: remove redundant initialization of variable i
The variable i is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210518182126.140978-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 219fa1382396..230b2c9b3e3c 100644
--- a/drivers/char/ttyprintk.c
+++ b/drivers/char/ttyprintk.c
@@ -52,7 +52,7 @@ static void tpk_flush(void)
static int tpk_printk(const unsigned char *buf, int count)
{
- int i = tpk_curr;
+ int i;
for (i = 0; i < count; i++) {
if (tpk_curr >= TPK_STR_SIZE) {