From: Cong Ding Date: Wed, 16 Jan 2013 22:30:43 +0000 (+0100) Subject: tty: serial/68328serial.c: remove unnecessary null pointer check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9ef20d52e0cd0d6ab78cab13563b16496bdc6995;p=linux-beck.git tty: serial/68328serial.c: remove unnecessary null pointer check The pointer info is dereferened in line 1009, so it is not necessary to check null again in line 1012. Signed-off-by: Cong Ding Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c index 641a5a4d73d9..49399470794d 100644 --- a/drivers/tty/serial/68328serial.c +++ b/drivers/tty/serial/68328serial.c @@ -1002,7 +1002,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) m68328_uart *uart = &uart_addr[info->line]; unsigned long flags; - if (!info || serial_paranoia_check(info, tty->name, "rs_close")) + if (serial_paranoia_check(info, tty->name, "rs_close")) return; local_irq_save(flags);