diff options
author | Paul Bolle <pebolle@tiscali.nl> | 2011-10-09 06:12:16 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-10-10 17:02:31 -0400 |
commit | 5a9b80e2cd993f77d6d068470a4fd77fdfae44ab (patch) | |
tree | 8d29877f4994770223b46062b0386700acbb5744 /drivers/bluetooth/btusb.c | |
parent | 3e90dc86f4b840297bd1fafdb9ba1bf58f2e0e49 (diff) |
Bluetooth: btusb: also be quiet when suspending
usb_submit_urb() returns -ENODEV when a usb device is disconnected. In
commit 4935f1c164ac528dff3538f97953b385ba500710 ("Bluetooth: btusb: be
quiet on device disconnect") I stopped treating that return as an error
in the three btusb_*_complete() functions.
It turns out btusb_send_frame() generates a similar error if the system
is suspended while the bluetooth usb device is enabled. The sensible
thing to do here seems to be to treat -ENODEV (and -EPERM) just like the
btusb_*_complete() functions now do.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r-- | drivers/bluetooth/btusb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 675246a6f7ef..18fde3be530f 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -767,7 +767,9 @@ skip_waking: | |||
767 | 767 | ||
768 | err = usb_submit_urb(urb, GFP_ATOMIC); | 768 | err = usb_submit_urb(urb, GFP_ATOMIC); |
769 | if (err < 0) { | 769 | if (err < 0) { |
770 | BT_ERR("%s urb %p submission failed", hdev->name, urb); | 770 | if (err != -EPERM && err != -ENODEV) |
771 | BT_ERR("%s urb %p submission failed (%d)", | ||
772 | hdev->name, urb, -err); | ||
771 | kfree(urb->setup_packet); | 773 | kfree(urb->setup_packet); |
772 | usb_unanchor_urb(urb); | 774 | usb_unanchor_urb(urb); |
773 | } else { | 775 | } else { |