From: Jiri Slaby Date: Wed, 4 Oct 2006 09:15:28 +0000 (-0700) Subject: [PATCH] Char: serial167, remove useless tty check X-Git-Tag: v4.13~41651 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d321765f7cbc2dc0683374c91bb3720d57331d37;p=mirror_ubuntu-bionic-kernel.git [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 Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index 48dae5d68dac..f4809c8183cc 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c @@ -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; }