From 326f28e9ec4b2619c2fd410593fc95fcb0ba6b41 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Sun, 25 Jun 2006 05:48:48 -0700 Subject: [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 Cc: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/synclink_gt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char/synclink_gt.c') diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index b4d1f4eea43..b4f1a5a435a 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c @@ -870,7 +870,7 @@ static int write(struct tty_struct *tty, goto cleanup; DBGINFO(("%s write count=%d\n", info->device_name, count)); - if (!tty || !info->tx_buf) + if (!info->tx_buf) goto cleanup; if (count > info->max_frame_size) { @@ -924,7 +924,7 @@ static void put_char(struct tty_struct *tty, unsigned char ch) if (sanity_check(info, tty->name, "put_char")) return; DBGINFO(("%s put_char(%d)\n", info->device_name, ch)); - if (!tty || !info->tx_buf) + if (!info->tx_buf) return; spin_lock_irqsave(&info->lock,flags); if (!info->tx_active && (info->tx_count < info->max_frame_size)) -- cgit v1.2.3