mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
can: gs_usb: gs_usb_probe(): use descriptors of current altsetting
commit2f361cd947upstream. Make sure to always use the descriptors of the current alternate setting to avoid future issues when accessing fields that may differ between settings. Signed-off-by: Johan Hovold <johan@kernel.org> Fixes:d08e973a77("can: gs_usb: Added support for the GS_USB CAN devices") Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
43e6fb6a0c
commit
7d2a38993c
@@ -927,7 +927,7 @@ static int gs_usb_probe(struct usb_interface *intf,
|
||||
GS_USB_BREQ_HOST_FORMAT,
|
||||
USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
|
||||
1,
|
||||
intf->altsetting[0].desc.bInterfaceNumber,
|
||||
intf->cur_altsetting->desc.bInterfaceNumber,
|
||||
hconf,
|
||||
sizeof(*hconf),
|
||||
1000);
|
||||
@@ -950,7 +950,7 @@ static int gs_usb_probe(struct usb_interface *intf,
|
||||
GS_USB_BREQ_DEVICE_CONFIG,
|
||||
USB_DIR_IN|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
|
||||
1,
|
||||
intf->altsetting[0].desc.bInterfaceNumber,
|
||||
intf->cur_altsetting->desc.bInterfaceNumber,
|
||||
dconf,
|
||||
sizeof(*dconf),
|
||||
1000);
|
||||
|
||||
Reference in New Issue
Block a user