diff mbox series

Bluetooth: btusb: Comment on unbalanced pm reference

Message ID 20200625162544.1.Iea2fbf7a284191c0f09c2ffbe8c14b872d0f68b2@changeid (mailing list archive)
State Not Applicable, archived
Headers show
Series Bluetooth: btusb: Comment on unbalanced pm reference | expand

Commit Message

Abhishek Pandit-Subedi June 25, 2020, 11:26 p.m. UTC
Add a comment clarifying that a PM reference in btusb_qca_cmd_timeout is
not unbalanced because it results in a device reset.

Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
---

 drivers/bluetooth/btusb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Marcel Holtmann June 26, 2020, 4:26 a.m. UTC | #1
Hi Abhishek,

> Add a comment clarifying that a PM reference in btusb_qca_cmd_timeout is
> not unbalanced because it results in a device reset.
> 
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
> 
> drivers/bluetooth/btusb.c | 1 +
> 1 file changed, 1 insertion(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index f8a71fdabb3d1b..0e143c0cecf2a1 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -581,6 +581,7 @@  static void btusb_qca_cmd_timeout(struct hci_dev *hdev)
 		return;
 
 	bt_dev_err(hdev, "Multiple cmd timeouts seen. Resetting usb device.");
+	/* This is not an unbalanced PM reference since the device will reset */
 	err = usb_autopm_get_interface(data->intf);
 	if (!err)
 		usb_queue_reset_device(data->intf);