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/isicom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char/isicom.c') diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index e9ebabaf8cb..efaaa1937ab 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, if (isicom_paranoia_check(port, tty->name, "isicom_write")) return 0; - if (!tty || !port->xmit_buf) + if (!port->xmit_buf) return 0; spin_lock_irqsave(&card->card_lock, flags); @@ -1180,7 +1180,7 @@ static void isicom_put_char(struct tty_struct *tty, unsigned char ch) if (isicom_paranoia_check(port, tty->name, "isicom_put_char")) return; - if (!tty || !port->xmit_buf) + if (!port->xmit_buf) return; spin_lock_irqsave(&card->card_lock, flags); -- cgit v1.2.2