USB: ftdi_sio: clean up read completion handler
authorJohan Hovold <jhovold@gmail.com>
Wed, 7 Oct 2009 18:05:06 +0000 (20:05 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Oct 2009 20:52:05 +0000 (13:52 -0700)
commite63e278b4d2d867893962d3c7cd13a3a24ceb3f1
tree356dffc7b4eb65e7052e58aabf523363e37867c1
parent63b0061246b54b849da8f189ae048e8110d8ce7d
USB: ftdi_sio: clean up read completion handler

Remove superfluous error checks in completion handler:

 - No need to check private data and urb pointers as we check urb-status
   before dereferencing priv (which is not freed until urb has been killed
   on close).
 - No need to check tty as it is checked again when processing.
 - No need to check urb->number_of_packets on bulk urb.

Note that both private data and tty are checked again before processing
(possibly from work queue which also is cancelled on close).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/ftdi_sio.c