]> git.baikalelectronics.ru Git - kernel.git/commit
can: gs_usb: gs_usb_get_timestamp(): fix endpoint parameter for usb_control_msg_recv()
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 20 Sep 2022 09:56:57 +0000 (11:56 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 23 Sep 2022 11:55:00 +0000 (13:55 +0200)
commit552f7fbddbbf07a9f135db6960f80b7f8144dd05
tree43cd8358530cd0a0390d55ef767f8679c32b41b8
parent4deb99012a922d39aac105cf49ae01c6d8747238
can: gs_usb: gs_usb_get_timestamp(): fix endpoint parameter for usb_control_msg_recv()

The 2nd argument of usb_control_msg_recv() is the "endpoint",
usb_control_msg_recv() will internally convert the endpoint into a
pipe with usb_rcvctrlpipe().

In gs_usb_get_timestamp() not the endpoint "0" is passed, but the
pipe. This worked by accident as endpoint is a __u8 and the lowest 8
bits of the pipe are 0. Fix this copy/paste error by using the correct
endpoint of "0".

Fixes: c351fac8f5e8 ("can: gs_usb: add RX and TX hardware timestamp support")
Link: https://lore.kernel.org/all/20220920100416.959226-2-mkl@pengutronix.de
Cc: John Whittington <git@jbrengineering.co.uk>
Tested-by: John Whittington <git@jbrengineering.co.uk>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/gs_usb.c