[PATCH] Clean up char/esp.c
authorEric Sesterhenn <snakebyte@gmx.de>
Sun, 25 Jun 2006 12:48:46 +0000 (05:48 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:01:17 +0000 (10:01 -0700)
coverity choked at another two !tty checks, in places where tty can
never be NULL. Since it removes some code we should remove
these checks. (Coverity ids #763,#762)

Signed-off-by Eric Sesterhenn <snakebyte@gmx.de>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/esp.c

index 09dc4b01232c018e95733b303a86ee8c2f9ed1ba..922174d527ae6325ed63562e1929f44892a9ded7 100644 (file)
@@ -1212,7 +1212,7 @@ static void rs_put_char(struct tty_struct *tty, unsigned char ch)
        if (serial_paranoia_check(info, tty->name, "rs_put_char"))
                return;
 
-       if (!tty || !info->xmit_buf)
+       if (!info->xmit_buf)
                return;
 
        spin_lock_irqsave(&info->lock, flags);
@@ -1256,7 +1256,7 @@ static int rs_write(struct tty_struct * tty,
        if (serial_paranoia_check(info, tty->name, "rs_write"))
                return 0;
 
-       if (!tty || !info->xmit_buf)
+       if (!info->xmit_buf)
                return 0;
            
        while (1) {