• Bjørn Mork's avatar
    USB: cdc-wdm: cannot use dev_printk when device is gone · 6b0b79d3
    Bjørn Mork authored
    We cannot dereference a removed USB interface for
    dev_printk. Use pr_debug instead where necessary.
    
    Flush errors are expected if device is unplugged and are
    therefore best ingored at this point.
    
    Move the kill_urbs() call in wdm_release with dev_dbg()
    for the non disconnect, as we know it has already been
    called if WDM_DISCONNECTING is set.  This does not
    actually fix anything, but keeps the code more consistent.
    
    Cc: Oliver Neukum <oliver@neukum.org>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    6b0b79d3
cdc-wdm.c 23.9 KB