can: gs_usb: gs_usb_probe(): use descriptors of current altsetting
authorJohan Hovold <johan@kernel.org>
Tue, 10 Dec 2019 11:32:31 +0000 (12:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 19:04:28 +0000 (20:04 +0100)
commit7d2a38993c80ccd8aef4b0687067732cd8fdad86
tree6a23d555b7a87915f68a4d6208a852d6d4eb50c7
parent43e6fb6a0c69add4496b98d4d22ddfafc3b296b1
can: gs_usb: gs_usb_probe(): use descriptors of current altsetting

commit 2f361cd9474ab2c4ab9ac8db20faf81e66c6279b upstream.

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: d08e973a77d1 ("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>
drivers/net/can/usb/gs_usb.c