diff options
author | Johan Hovold <johan@kernel.org> | 2019-11-07 14:28:58 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2019-11-12 09:56:58 +0100 |
commit | 3ec9fb6f385461923b77de6072403e97d2efe01b (patch) | |
tree | 009ea10c3aadc9ada97270d9353f46540289b645 /drivers | |
parent | USB: serial: mos7840: rip out broken interrupt handling (diff) | |
download | linux-3ec9fb6f385461923b77de6072403e97d2efe01b.tar.xz linux-3ec9fb6f385461923b77de6072403e97d2efe01b.zip |
USB: serial: mos7840: drop redundant urb context check
The bulk-in URB context is set to the driver-data struct at open and is
never cleared so drop the redundant check in the completion callback.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/mos7840.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 9c5956fbd600..92180687097f 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -500,17 +500,13 @@ static struct usb_serial *mos7840_get_usb_serial(struct usb_serial_port *port, static void mos7840_bulk_in_callback(struct urb *urb) { + struct moschip_port *mos7840_port = urb->context; int retval; unsigned char *data; struct usb_serial *serial; struct usb_serial_port *port; - struct moschip_port *mos7840_port; int status = urb->status; - mos7840_port = urb->context; - if (!mos7840_port) - return; - if (status) { dev_dbg(&urb->dev->dev, "nonzero read bulk status received: %d\n", status); mos7840_port->read_urb_busy = false; |