[PATCH can-next 09/10] can: gs_usb: gs_usb_receive_bulk_callback(): no need to assign CAN_ERR_DLC
From: Marc Kleine-Budde
Date: Sat Oct 03 2026 - 18:57:26 EST
There's no need to assign CAN_ERR_DLC to the length of CAN error frames
allocated with alloc_can_err_skb(), this function already sets the length.
Remove unneeded assignment of the CAN error frame's len.
Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
---
drivers/net/can/usb/gs_usb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 190cd3701202..3c0464edb5d3 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -735,7 +735,6 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
goto can_rx_offload_irq_finish;
cf->can_id |= CAN_ERR_CRTL;
- cf->len = CAN_ERR_DLC;
cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
gs_usb_rx_offload(dev, skb, hf);
--
2.53.0