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>
This commit is contained in:
Alan Cox
2008-10-13 10:44:57 +01:00
committed by Linus Torvalds
parent ea1afd2562
commit 51383f69ec
6 changed files with 1 additions and 79 deletions

View File

@@ -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"))