diff options
author | Alan Cox <alan@redhat.com> | 2008-10-13 05:44:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 12:51:44 -0400 |
commit | 51383f69ec56fe3f425d5255fb43e18c445e061c (patch) | |
tree | f9d9e280892702c3a47ffa807c0937ea9c80e315 /drivers/char/mxser.c | |
parent | ea1afd256258f04a290aaa7fd5c2d4deb2e79e26 (diff) |
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>
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 308cb6014002..8beef50f95a0 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -616,9 +616,6 @@ static int mxser_set_baud(struct tty_struct *tty, long newspd) | |||
616 | int quot = 0, baud; | 616 | int quot = 0, baud; |
617 | unsigned char cval; | 617 | unsigned char cval; |
618 | 618 | ||
619 | if (!tty->termios) | ||
620 | return -1; | ||
621 | |||
622 | if (!info->ioaddr) | 619 | if (!info->ioaddr) |
623 | return -1; | 620 | return -1; |
624 | 621 | ||
@@ -688,8 +685,6 @@ static int mxser_change_speed(struct tty_struct *tty, | |||
688 | int ret = 0; | 685 | int ret = 0; |
689 | unsigned char status; | 686 | unsigned char status; |
690 | 687 | ||
691 | if (!tty->termios) | ||
692 | return ret; | ||
693 | cflag = tty->termios->c_cflag; | 688 | cflag = tty->termios->c_cflag; |
694 | if (!info->ioaddr) | 689 | if (!info->ioaddr) |
695 | return ret; | 690 | return ret; |