Explorar el Código

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 <dinggnu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cong Ding hace 13 años
padre
commit
9ef20d52e0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      drivers/tty/serial/68328serial.c

+ 1 - 1
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);