Skip to content

Commit

Permalink
usb-serial: remove NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jan 13, 2009
1 parent 21b56ec commit bf0672d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bf0672d

Please sign in to comment.