[PATCH] Char: serial167, remove useless tty check

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>
This commit is contained in:
Jiri Slaby 2006-10-04 02:15:28 -07:00 committed by Linus Torvalds
parent b3218a79aa
commit d321765f7c
1 changed files with 2 additions and 2 deletions

View 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;
}