summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/kgdb_nmi.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-05-14 00:02:24 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-20 16:22:09 +0200
commit1e49b0954c91019f51ce22cd0bce2297dd928f8c (patch)
treec390663e18e36558449416938bd9b08772082cde /drivers/tty/serial/kgdb_nmi.c
parent064b6e47b2b2d4a20566ba6f8dc90e46b599b35f (diff)
serial: kgdb_nmi: remove redundant initialization of variable c
The variable c is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210513230224.138859-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/kgdb_nmi.c')
-rw-r--r--drivers/tty/serial/kgdb_nmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index b193bbc666d4..3e7c6ee8e4b3 100644
--- a/drivers/tty/serial/kgdb_nmi.c
+++ b/drivers/tty/serial/kgdb_nmi.c
@@ -115,7 +115,7 @@ static void kgdb_tty_recv(int ch)
static int kgdb_nmi_poll_one_knock(void)
{
static int n;
- int c = -1;
+ int c;
const char *magic = kgdb_nmi_magic;
size_t m = strlen(magic);
bool printch = false;