diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-25 08:48:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:19 -0400 |
commit | 326f28e9ec4b2619c2fd410593fc95fcb0ba6b41 (patch) | |
tree | 2a11507d8ab266b1f0eac6d3b3f37e9d18ddec5d /drivers/char/pcmcia | |
parent | fa791f5bdfa026a9abe1b48934943fd39f1e300b (diff) |
[PATCH] More !tty cleanups in drivers/char
Another bunch of checks in the char drivers .put_char() and .write()
routines, where tty can never be NULL. This patch removes these checks to
save some code. Coverity choked at those with the following bug ids:
isicom.c 767, 766
specialix.c 773, 774
synclink_cs.c 779, 781
synclink_gt.c 784, 785
synclinkmp.c 784, 785
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/pcmcia')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 0c141c295fb6..17bc8abd5df5 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -1582,7 +1582,7 @@ static void mgslpc_put_char(struct tty_struct *tty, unsigned char ch) | |||
1582 | if (mgslpc_paranoia_check(info, tty->name, "mgslpc_put_char")) | 1582 | if (mgslpc_paranoia_check(info, tty->name, "mgslpc_put_char")) |
1583 | return; | 1583 | return; |
1584 | 1584 | ||
1585 | if (!tty || !info->tx_buf) | 1585 | if (!info->tx_buf) |
1586 | return; | 1586 | return; |
1587 | 1587 | ||
1588 | spin_lock_irqsave(&info->lock,flags); | 1588 | spin_lock_irqsave(&info->lock,flags); |
@@ -1649,7 +1649,7 @@ static int mgslpc_write(struct tty_struct * tty, | |||
1649 | __FILE__,__LINE__,info->device_name,count); | 1649 | __FILE__,__LINE__,info->device_name,count); |
1650 | 1650 | ||
1651 | if (mgslpc_paranoia_check(info, tty->name, "mgslpc_write") || | 1651 | if (mgslpc_paranoia_check(info, tty->name, "mgslpc_write") || |
1652 | !tty || !info->tx_buf) | 1652 | !info->tx_buf) |
1653 | goto cleanup; | 1653 | goto cleanup; |
1654 | 1654 | ||
1655 | if (info->params.mode == MGSL_MODE_HDLC) { | 1655 | if (info->params.mode == MGSL_MODE_HDLC) { |