mirror-linux/drivers/net/can/usb
Marc Kleine-Budde 3e54d3b4a8 can: gs_usb: gs_can_open(): fix error handling
Commit 2603be9e81 ("can: gs_usb: gs_can_open(): improve error handling")
added missing error handling to the gs_can_open() function.

The driver uses 2 USB anchors to track the allocated URBs: the TX URBs in
struct gs_can::tx_submitted for each netdev and the RX URBs in struct
gs_usb::rx_submitted for the USB device. gs_can_open() allocates the RX
URBs, while TX URBs are allocated during gs_can_start_xmit().

The cleanup in gs_can_open() kills all anchored dev->tx_submitted
URBs (which is not necessary since the netdev is not yet registered), but
misses the parent->rx_submitted URBs.

Fix the problem by killing the rx_submitted instead of the tx_submitted.

Fixes: 2603be9e81 ("can: gs_usb: gs_can_open(): improve error handling")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20251210-gs_usb-fix-error-handling-v1-1-d6a5a03f10bb@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-12-10 09:30:31 +01:00
..
etas_es58x can: convert generic HW timestamp ioctl to ndo_hwtstamp callbacks 2025-10-31 13:12:18 +01:00
kvaser_usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-11-27 12:19:08 -08:00
peak_usb can: peak_usb: convert to use ndo_hwtstamp callbacks 2025-10-31 13:12:18 +01:00
Kconfig can: Add Nuvoton NCT6694 CANFD support 2025-09-16 14:41:57 +01:00
Makefile can: Add Nuvoton NCT6694 CANFD support 2025-09-16 14:41:57 +01:00
ems_usb.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
esd_usb.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
f81604.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
gs_usb.c can: gs_usb: gs_can_open(): fix error handling 2025-12-10 09:30:31 +01:00
mcba_usb.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
nct6694_canfd.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
ucan.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
usb_8dev.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00