UPSTREAM: USB: cdc-wdm: cannot use dev_printk when device is gone
authorBjørn Mork <bjorn@mork.no>
Wed, 9 May 2012 11:53:22 +0000 (13:53 +0200)
committerGerrit <chrome-bot@google.com>
Tue, 16 Oct 2012 21:10:56 +0000 (14:10 -0700)
commit20495e6280bd6cbee492107f98c70ce1f06c90f8
treeb004748ba8059bda3bf14d9e42f7f67aaa479682
parent4164f43134e2e1b8d8c07ce07d23d39a80d7c0b8
UPSTREAM: USB: cdc-wdm: cannot use dev_printk when device is gone

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: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6b0b79d38806481c1c8fffa7c5842f3c83679a42)

Change-Id: Ibad6db9ffb2232308d615fb348ebdf05efbb6be9
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35155
Reviewed-by: Olof Johansson <olofj@chromium.org>
drivers/usb/class/cdc-wdm.c