can: sun4i_can: continue to use likely() to check skb
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Fri, 22 Nov 2024 22:15:44 +0000 (23:15 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 23 Dec 2024 11:39:12 +0000 (12:39 +0100)
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>
drivers/net/can/sun4i_can.c

index 360158c295d348efc5547826f7dbf9c848bb80a9..48d31197adec22df702b629d4341b73b477f443d 100644 (file)
@@ -570,7 +570,7 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status)
                else
                        state = CAN_STATE_ERROR_ACTIVE;
        }
-       if (skb && state != CAN_STATE_BUS_OFF) {
+       if (likely(skb) && state != CAN_STATE_BUS_OFF) {
                cf->can_id |= CAN_ERR_CNT;
                cf->data[6] = txerr;
                cf->data[7] = rxerr;