From 827afdf093cce59bbbf9dc9f1c2eab86e2232b9e Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 16 Oct 2007 23:29:25 -0700 Subject: [PATCH] n_hdlc.c: fix check-after-use The Coverity checker spotted that we'd have already oops'ed if "tty" was NULL. Since "tty" can't be NULL when we reach this line of code this patch removes the NULL check. Signed-off-by: Adrian Bunk Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/n_hdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index e8332f305d..82bcfb9c83 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c @@ -229,7 +229,7 @@ static void n_hdlc_release(struct n_hdlc *n_hdlc) wake_up_interruptible (&tty->read_wait); wake_up_interruptible (&tty->write_wait); - if (tty != NULL && tty->disc_data == n_hdlc) + if (tty->disc_data == n_hdlc) tty->disc_data = NULL; /* Break the tty->n_hdlc link */ /* Release transmit and receive buffers */ -- 2.39.5