Skip to content

Commit

Permalink
Bluetooth: fix crash with quirky dongles doing sound
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Gustavo F. Padovan committed Feb 16, 2011
1 parent a7b545f commit 8efdd0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static void btusb_work(struct work_struct *work)

if (hdev->conn_hash.sco_num > 0) {
if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
err = usb_autopm_get_interface(data->isoc);
err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf);
if (err < 0) {
clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
usb_kill_anchored_urbs(&data->isoc_anchor);
Expand Down Expand Up @@ -858,7 +858,7 @@ static void btusb_work(struct work_struct *work)

__set_isoc_interface(hdev, 0);
if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
usb_autopm_put_interface(data->isoc);
usb_autopm_put_interface(data->isoc ? data->isoc : data->intf);
}
}

Expand Down

0 comments on commit 8efdd0c

Please sign in to comment.