Commit d321765f authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

[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: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b3218a79
...@@ -1121,7 +1121,7 @@ cy_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -1121,7 +1121,7 @@ cy_put_char(struct tty_struct *tty, unsigned char ch)
if (serial_paranoia_check(info, tty->name, "cy_put_char")) if (serial_paranoia_check(info, tty->name, "cy_put_char"))
return; return;
if (!tty || !info->xmit_buf) if (!info->xmit_buf)
return; return;
local_irq_save(flags); local_irq_save(flags);
...@@ -1187,7 +1187,7 @@ cy_write(struct tty_struct * tty, ...@@ -1187,7 +1187,7 @@ cy_write(struct tty_struct * tty,
return 0; return 0;
} }
if (!tty || !info->xmit_buf){ if (!info->xmit_buf){
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment