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/isicom.c | |
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/isicom.c')
-rw-r--r-- | drivers/char/isicom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index e9ebabaf8cb0..efaaa1937ab6 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -1145,7 +1145,7 @@ static int isicom_write(struct tty_struct *tty, const unsigned char *buf, | |||
1145 | if (isicom_paranoia_check(port, tty->name, "isicom_write")) | 1145 | if (isicom_paranoia_check(port, tty->name, "isicom_write")) |
1146 | return 0; | 1146 | return 0; |
1147 | 1147 | ||
1148 | if (!tty || !port->xmit_buf) | 1148 | if (!port->xmit_buf) |
1149 | return 0; | 1149 | return 0; |
1150 | 1150 | ||
1151 | spin_lock_irqsave(&card->card_lock, flags); | 1151 | spin_lock_irqsave(&card->card_lock, flags); |
@@ -1180,7 +1180,7 @@ static void isicom_put_char(struct tty_struct *tty, unsigned char ch) | |||
1180 | if (isicom_paranoia_check(port, tty->name, "isicom_put_char")) | 1180 | if (isicom_paranoia_check(port, tty->name, "isicom_put_char")) |
1181 | return; | 1181 | return; |
1182 | 1182 | ||
1183 | if (!tty || !port->xmit_buf) | 1183 | if (!port->xmit_buf) |
1184 | return; | 1184 | return; |
1185 | 1185 | ||
1186 | spin_lock_irqsave(&card->card_lock, flags); | 1186 | spin_lock_irqsave(&card->card_lock, flags); |