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:
@@ -616,9 +616,6 @@ static int mxser_set_baud(struct tty_struct *tty, long newspd)
|
||||
int quot = 0, baud;
|
||||
unsigned char cval;
|
||||
|
||||
if (!tty->termios)
|
||||
return -1;
|
||||
|
||||
if (!info->ioaddr)
|
||||
return -1;
|
||||
|
||||
@@ -688,8 +685,6 @@ static int mxser_change_speed(struct tty_struct *tty,
|
||||
int ret = 0;
|
||||
unsigned char status;
|
||||
|
||||
if (!tty->termios)
|
||||
return ret;
|
||||
cflag = tty->termios->c_cflag;
|
||||
if (!info->ioaddr)
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user