[PATCH] Char: serial167, remove useless tty check
authorJiri Slaby <jirislaby@gmail.com>
Wed, 4 Oct 2006 09:15:28 +0000 (02:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 14:55:13 +0000 (07:55 -0700)
serial167, remove useless tty check

tty is dereferenced before it is checked to be non-NULL.  Remove such
check.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/serial167.c

index 48dae5d68dac5c0c8338b6d6fa589bc4e60c756c..f4809c8183ccd9acaf1dfe4dbbec145ff6700929 100644 (file)
@@ -1121,7 +1121,7 @@ cy_put_char(struct tty_struct *tty, unsigned char ch)
     if (serial_paranoia_check(info, tty->name, "cy_put_char"))
        return;
 
-    if (!tty || !info->xmit_buf)
+    if (!info->xmit_buf)
        return;
 
     local_irq_save(flags);
@@ -1187,7 +1187,7 @@ cy_write(struct tty_struct * tty,
        return 0;
     }
        
-    if (!tty || !info->xmit_buf){
+    if (!info->xmit_buf){
         return 0;
     }