summaryrefslogtreecommitdiffstats
path: root/drivers/char/amiserial.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 10:44:57 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 09:51:44 -0700
commit51383f69ec56fe3f425d5255fb43e18c445e061c (patch)
treef9d9e280892702c3a47ffa807c0937ea9c80e315 /drivers/char/amiserial.c
parentea1afd256258f04a290aaa7fd5c2d4deb2e79e26 (diff)
downloadblackbird-op-linux-51383f69ec56fe3f425d5255fb43e18c445e061c.tar.gz
blackbird-op-linux-51383f69ec56fe3f425d5255fb43e18c445e061c.zip
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/amiserial.c')
-rw-r--r--drivers/char/amiserial.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index 6e763e3f5a81..98821f97583c 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"))
OpenPOWER on IntegriCloud