diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-10-17 02:29:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:55 -0400 |
commit | 827afdf093cce59bbbf9dc9f1c2eab86e2232b9e (patch) | |
tree | 287510107cb816eb7529da88f961a4b49ffe673d /drivers/char | |
parent | cba4fbbff2e9722e93b28e18fa7714b9013cbdda (diff) |
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 <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/n_hdlc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index e8332f305d72..82bcfb9c839a 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) | |||
229 | wake_up_interruptible (&tty->read_wait); | 229 | wake_up_interruptible (&tty->read_wait); |
230 | wake_up_interruptible (&tty->write_wait); | 230 | wake_up_interruptible (&tty->write_wait); |
231 | 231 | ||
232 | if (tty != NULL && tty->disc_data == n_hdlc) | 232 | if (tty->disc_data == n_hdlc) |
233 | tty->disc_data = NULL; /* Break the tty->n_hdlc link */ | 233 | tty->disc_data = NULL; /* Break the tty->n_hdlc link */ |
234 | 234 | ||
235 | /* Release transmit and receive buffers */ | 235 | /* Release transmit and receive buffers */ |