Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: sun4i_can: continue to use likely() to check skb

Throughout the sun4i_can_err() function, the likely() macro is used to
check the skb buffer, except in one instance. This patch makes the code
consistent by using the macro in that case as well.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://patch.msgid.link/20241122221650.633981-4-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Dario Binacchi and committed by
Marc Kleine-Budde
bddad4fa ad79f18b

+1 -1
+1 -1
drivers/net/can/sun4i_can.c
··· 570 570 else 571 571 state = CAN_STATE_ERROR_ACTIVE; 572 572 } 573 - if (skb && state != CAN_STATE_BUS_OFF) { 573 + if (likely(skb) && state != CAN_STATE_BUS_OFF) { 574 574 cf->can_id |= CAN_ERR_CNT; 575 575 cf->data[6] = txerr; 576 576 cf->data[7] = rxerr;