USB: serial: drop bogus to_usb_serial_port() checks
authorJohan Hovold <johan@kernel.org>
Mon, 8 Feb 2021 15:48:06 +0000 (16:48 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 9 Feb 2021 12:14:30 +0000 (13:14 +0100)
commit1542d1324be1191d970f69c55e885af5dd810b84
treee5dda4b2db9d2ce71cba380279a85bc060a17739
parentc5d1448fa353242635fa3e1fed6ab4558e0e7d9a
USB: serial: drop bogus to_usb_serial_port() checks

The to_usb_serial_port() macro is implemented using container_of() so
there's no need to check for NULL.

Note that neither bus match() or probe() is ever called with a NULL
struct device pointer so the checks weren't just misplaced.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/bus.c