• Johan Hovold's avatar
    USB: ftdi_sio: clean up read completion handler · e63e278b
    Johan Hovold authored
    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: default avatarJohan Hovold <jhovold@gmail.com>
    Cc: stable <stable@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    e63e278b
ftdi_sio.c 88.7 KB