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:
@@ -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"))
|
||||
|
Reference in New Issue
Block a user