aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2011-02-11 07:00:06 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-16 13:53:45 -0500
commit8efdd0cdc54f3bb5db464b3baf88f7441f54da47 (patch)
treea84f3d07d83aaa8a0744a77d92505d8128363b93
parenta7b545f7fe753ca3dc1b51ca57f90cd59d974e44 (diff)
Bluetooth: fix crash with quirky dongles doing sound
Quirky dongles sometimes do not use the iso interface which causes a crash with runtime PM Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
-rw-r--r--drivers/bluetooth/btusb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 4cefa91e6c34..664f1cc9f8d4 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -829,7 +829,7 @@ static void btusb_work(struct work_struct *work)
829 829
830 if (hdev->conn_hash.sco_num > 0) { 830 if (hdev->conn_hash.sco_num > 0) {
831 if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) { 831 if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
832 err = usb_autopm_get_interface(data->isoc); 832 err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf);
833 if (err < 0) { 833 if (err < 0) {
834 clear_bit(BTUSB_ISOC_RUNNING, &data->flags); 834 clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
835 usb_kill_anchored_urbs(&data->isoc_anchor); 835 usb_kill_anchored_urbs(&data->isoc_anchor);
@@ -858,7 +858,7 @@ static void btusb_work(struct work_struct *work)
858 858
859 __set_isoc_interface(hdev, 0); 859 __set_isoc_interface(hdev, 0);
860 if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags)) 860 if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
861 usb_autopm_put_interface(data->isoc); 861 usb_autopm_put_interface(data->isoc ? data->isoc : data->intf);
862 } 862 }
863} 863}
864 864