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/amiserial.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/char/amiserial.c') diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index 6e763e3f5a8..98821f97583 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c @@ -837,9 +837,6 @@ static int rs_put_char(struct tty_struct *tty, unsigned char ch) struct async_struct *info; unsigned long flags; - if (!tty) - return 0; - info = tty->driver_data; if (serial_paranoia_check(info, tty->name, "rs_put_char")) @@ -892,9 +889,6 @@ static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count struct async_struct *info; unsigned long flags; - if (!tty) - return 0; - info = tty->driver_data; if (serial_paranoia_check(info, tty->name, "rs_write")) -- cgit v1.2.3