From: Paul Bolle Date: Sun, 9 Oct 2011 10:12:22 +0000 (+0200) Subject: Bluetooth: btusb: hide more usb_submit_urb errors X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d4b8d1c9c1564f4cbce86cbbee099fadf735b226;p=mv-sheeva.git Bluetooth: btusb: hide more usb_submit_urb errors There are still three calls of usb_submit_urb() that will print errors if those calls return -EPERM or -ENODEV. I have never triggered these, so I'm not sure when these return values might be seen. It still makes sense to be silent if these occur (since "urb is being killed" and "device got disconnected" aren't things to worry about). Signed-off-by: Paul Bolle Signed-off-by: Gustavo F. Padovan --- diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 18fde3be530..abfc4ee87ee 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -312,7 +312,8 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags) err = usb_submit_urb(urb, mem_flags); if (err < 0) { - BT_ERR("%s urb %p submission failed (%d)", + if (err != -EPERM && err != -ENODEV) + BT_ERR("%s urb %p submission failed (%d)", hdev->name, urb, -err); usb_unanchor_urb(urb); } @@ -397,7 +398,8 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags) err = usb_submit_urb(urb, mem_flags); if (err < 0) { - BT_ERR("%s urb %p submission failed (%d)", + if (err != -EPERM && err != -ENODEV) + BT_ERR("%s urb %p submission failed (%d)", hdev->name, urb, -err); usb_unanchor_urb(urb); } @@ -520,7 +522,8 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags) err = usb_submit_urb(urb, mem_flags); if (err < 0) { - BT_ERR("%s urb %p submission failed (%d)", + if (err != -EPERM && err != -ENODEV) + BT_ERR("%s urb %p submission failed (%d)", hdev->name, urb, -err); usb_unanchor_urb(urb); }