aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r--drivers/bluetooth/btusb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 7ba91aa3fe8b..44bc8bbabf54 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -591,6 +591,7 @@ static int btusb_close(struct hci_dev *hdev)
591 return 0; 591 return 0;
592 592
593 cancel_work_sync(&data->work); 593 cancel_work_sync(&data->work);
594 cancel_work_sync(&data->waker);
594 595
595 clear_bit(BTUSB_ISOC_RUNNING, &data->flags); 596 clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
596 clear_bit(BTUSB_BULK_RUNNING, &data->flags); 597 clear_bit(BTUSB_BULK_RUNNING, &data->flags);
@@ -599,11 +600,13 @@ static int btusb_close(struct hci_dev *hdev)
599 btusb_stop_traffic(data); 600 btusb_stop_traffic(data);
600 err = usb_autopm_get_interface(data->intf); 601 err = usb_autopm_get_interface(data->intf);
601 if (err < 0) 602 if (err < 0)
602 return 0; 603 goto failed;
603 604
604 data->intf->needs_remote_wakeup = 0; 605 data->intf->needs_remote_wakeup = 0;
605 usb_autopm_put_interface(data->intf); 606 usb_autopm_put_interface(data->intf);
606 607
608failed:
609 usb_scuttle_anchored_urbs(&data->deferred);
607 return 0; 610 return 0;
608} 611}
609 612