[PATCH] Bluetooth: btusb: Use right timeout macro to receive control message

Zijun Hu
2024-02-23T10:00:31Z

USB driver defines macro @USB_CTRL_SET_TIMEOUT for sending control message
and @USB_CTRL_GET_TIMEOUT for receiving, but sierra_get_swoc_info() wrongly
uses @USB_CTRL_SET_TIMEOUT as argument of usb_control_msg() to receive
control message, fixed by using @USB_CTRL_GET_TIMEOUT to receive message.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
drivers/usb/storage/sierra_ms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c
index 177fa6cd143a..8b5a88ea4803 100644
--- a/drivers/usb/storage/sierra_ms.c
+++ b/drivers/usb/storage/sierra_ms.c
@@ -75,7 +75,7 @@ static int sierra_get_swoc_info(struct usb_device *udev,
0, /* __u16 index */
(void *) swocInfo, /* void *data */
sizeof(struct swoc_info), /* __u16 size */
- USB_CTRL_SET_TIMEOUT); /* int timeout */
+ USB_CTRL_GET_TIMEOUT); /* int timeout */

swocInfo->LinuxSKU = le16_to_cpu(swocInfo->LinuxSKU);
swocInfo->LinuxVer = le16_to_cpu(swocInfo->LinuxVer);
--
2.7.4