From 51383f69ec56fe3f425d5255fb43e18c445e061c Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 13 Oct 2008 10:44:57 +0100 Subject: 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 Signed-off-by: Linus Torvalds --- drivers/char/n_r3964.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/char/n_r3964.c') diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c index ae377aa473b..4a8215a89ad 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, static void put_char(struct r3964_info *pInfo, unsigned char ch) { struct tty_struct *tty = pInfo->tty; - - if (tty == NULL) - return; - /* FIXME: put_char should not be called from an IRQ */ - if (tty->ops->put_char) { - tty->ops->put_char(tty, ch); - } + tty_put_char(tty, ch); pInfo->bcc ^= ch; } -- cgit v1.2.3