aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/n_r3964.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 05:44:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:51:44 -0400
commit51383f69ec56fe3f425d5255fb43e18c445e061c (patch)
treef9d9e280892702c3a47ffa807c0937ea9c80e315 /drivers/char/n_r3964.c
parentea1afd256258f04a290aaa7fd5c2d4deb2e79e26 (diff)
tty: Remove lots of NULL checks
Many tty drivers contain 'can't happen' checks against NULL pointers passed in by the tty layer. These have never been possible to occur. Even more importantly if they ever do occur we want to know as it would be a serious bug. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/n_r3964.c')
-rw-r--r--drivers/char/n_r3964.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c
index ae377aa473ba..4a8215a89ad3 100644
--- a/drivers/char/n_r3964.c
+++ b/drivers/char/n_r3964.c
@@ -372,14 +372,8 @@ static void remove_from_rx_queue(struct r3964_info *pInfo,
372static void put_char(struct r3964_info *pInfo, unsigned char ch) 372static void put_char(struct r3964_info *pInfo, unsigned char ch)
373{ 373{
374 struct tty_struct *tty = pInfo->tty; 374 struct tty_struct *tty = pInfo->tty;
375
376 if (tty == NULL)
377 return;
378
379 /* FIXME: put_char should not be called from an IRQ */ 375 /* FIXME: put_char should not be called from an IRQ */
380 if (tty->ops->put_char) { 376 tty_put_char(tty, ch);
381 tty->ops->put_char(tty, ch);
382 }
383 pInfo->bcc ^= ch; 377 pInfo->bcc ^= ch;
384} 378}
385 379