Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
    }