diff options
author | Dario Binacchi <dario.binacchi@amarulasolutions.com> | 2024-11-22 23:15:44 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2024-12-23 12:39:12 +0100 |
commit | bddad4fac9f73c14f57b111058dd0fa6d9ede228 (patch) | |
tree | a1ff1f36618b862fc051b9a2eb224e1ba85e4b61 /drivers/net/can | |
parent | Merge patch series "can: tcan4x5x: add option for selecting nWKRQ voltage" (diff) | |
download | linux-bddad4fac9f73c14f57b111058dd0fa6d9ede228.tar.xz linux-bddad4fac9f73c14f57b111058dd0fa6d9ede228.zip |
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>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/sun4i_can.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c index 360158c295d3..48d31197adec 100644 --- a/drivers/net/can/sun4i_can.c +++ b/drivers/net/can/sun4i_can.c @@ -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; |