usb-serial: remove NULL check
authorAlan Cox <alan@redhat.com>
Sun, 11 Jan 2009 19:48:41 +0000 (19:48 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Jan 2009 00:37:00 +0000 (16:37 -0800)
Julia Lawell found a case where a NULL check was misplaced in the
usb-serial code. However as the object in question cannot be NULL the
check can simply be removed.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/serial/usb-serial.c

index 080ade223d53fe1306206f8b0f93388f75c17246..cfcfd5ab06ceb5838f6bdc274e78a30697714d1a 100644 (file)
@@ -511,9 +511,6 @@ static void usb_serial_port_work(struct work_struct *work)
 
        dbg("%s - port %d", __func__, port->number);
 
-       if (!port)
-               return;
-
        tty = tty_port_tty_get(&port->port);
        if (!tty)
                return;