diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-25 05:48:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 10:01:19 -0700 |
commit | 326f28e9ec4b2619c2fd410593fc95fcb0ba6b41 (patch) | |
tree | 2a11507d8ab266b1f0eac6d3b3f37e9d18ddec5d /drivers/char/pcmcia | |
parent | fa791f5bdfa026a9abe1b48934943fd39f1e300b (diff) | |
download | linux-3.10-326f28e9ec4b2619c2fd410593fc95fcb0ba6b41.tar.gz linux-3.10-326f28e9ec4b2619c2fd410593fc95fcb0ba6b41.tar.bz2 linux-3.10-326f28e9ec4b2619c2fd410593fc95fcb0ba6b41.zip |
[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 0c141c295fb..17bc8abd5df 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) if (mgslpc_paranoia_check(info, tty->name, "mgslpc_put_char")) return; - if (!tty || !info->tx_buf) + if (!info->tx_buf) return; spin_lock_irqsave(&info->lock,flags); @@ -1649,7 +1649,7 @@ static int mgslpc_write(struct tty_struct * tty, __FILE__,__LINE__,info->device_name,count); if (mgslpc_paranoia_check(info, tty->name, "mgslpc_write") || - !tty || !info->tx_buf) + !info->tx_buf) goto cleanup; if (info->params.mode == MGSL_MODE_HDLC) { |