From: Chris Malley tty has already been dereferenced at least twice in these functions, so checking for null here seems a bit unnecessary. Signed-off-by: Chris Malley Acked-by: Alan Cox Signed-off-by: Andrew Morton --- drivers/char/riscom8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/char/riscom8.c~riscom8-remove-redundant-null-pointer-test drivers/char/riscom8.c --- a/drivers/char/riscom8.c~riscom8-remove-redundant-null-pointer-test +++ a/drivers/char/riscom8.c @@ -1108,7 +1108,7 @@ static int rc_write(struct tty_struct *t bp = port_Board(port); - if (!tty || !port->xmit_buf) + if (!port->xmit_buf) return 0; while (1) { @@ -1151,7 +1151,7 @@ static int rc_put_char(struct tty_struct if (rc_paranoia_check(port, tty->name, "rc_put_char")) return 0; - if (!tty || !port->xmit_buf) + if (!port->xmit_buf) return 0; spin_lock_irqsave(&riscom_lock, flags); _