aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink_gt.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-06-25 08:48:48 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:01:19 -0400
commit326f28e9ec4b2619c2fd410593fc95fcb0ba6b41 (patch)
tree2a11507d8ab266b1f0eac6d3b3f37e9d18ddec5d /drivers/char/synclink_gt.c
parentfa791f5bdfa026a9abe1b48934943fd39f1e300b (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/synclink_gt.c')
-rw-r--r--drivers/char/synclink_gt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index b4d1f4eea435..b4f1a5a435aa 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -870,7 +870,7 @@ static int write(struct tty_struct *tty,
870 goto cleanup; 870 goto cleanup;
871 DBGINFO(("%s write count=%d\n", info->device_name, count)); 871 DBGINFO(("%s write count=%d\n", info->device_name, count));
872 872
873 if (!tty || !info->tx_buf) 873 if (!info->tx_buf)
874 goto cleanup; 874 goto cleanup;
875 875
876 if (count > info->max_frame_size) { 876 if (count > info->max_frame_size) {
@@ -924,7 +924,7 @@ static void put_char(struct tty_struct *tty, unsigned char ch)
924 if (sanity_check(info, tty->name, "put_char")) 924 if (sanity_check(info, tty->name, "put_char"))
925 return; 925 return;
926 DBGINFO(("%s put_char(%d)\n", info->device_name, ch)); 926 DBGINFO(("%s put_char(%d)\n", info->device_name, ch));
927 if (!tty || !info->tx_buf) 927 if (!info->tx_buf)
928 return; 928 return;
929 spin_lock_irqsave(&info->lock,flags); 929 spin_lock_irqsave(&info->lock,flags);
930 if (!info->tx_active && (info->tx_count < info->max_frame_size)) 930 if (!info->tx_active && (info->tx_count < info->max_frame_size))