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