Skip to content

Commit bddad4f

Browse files
passgatmarckleinebudde
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent ad79f18 commit bddad4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/can/sun4i_can.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status)
570570
else
571571
state = CAN_STATE_ERROR_ACTIVE;
572572
}
573-
if (skb && state != CAN_STATE_BUS_OFF) {
573+
if (likely(skb) && state != CAN_STATE_BUS_OFF) {
574574
cf->can_id |= CAN_ERR_CNT;
575575
cf->data[6] = txerr;
576576
cf->data[7] = rxerr;

0 commit comments

Comments
 (0)