Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb-serial: remove NULL check

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>

authored by

Alan Cox and committed by
Linus Torvalds
bf0672db 21b56ec4

-3
-3
drivers/usb/serial/usb-serial.c
··· 511 511 512 512 dbg("%s - port %d", __func__, port->number); 513 513 514 - if (!port) 515 - return; 516 - 517 514 tty = tty_port_tty_get(&port->port); 518 515 if (!tty) 519 516 return;