]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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>
Thu, 22 Oct 2009 22:11:47 +0000 (15:11 -0700)
commit990399b24d86bb171ff21c333109b0dd05fae669
tree13241083ae3332f3aa1ad3817d040c4e5457ef55
parentf604f3b1271d5eea4e9edd067d93063f99b628b2
USB: ftdi_sio: clean up read completion handler

commit e63e278b4d2d867893962d3c7cd13a3a24ceb3f1 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/ftdi_sio.c