]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: sun4i_can: sun4i_can_err(): call can_change_state() even if cf is NULL
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Fri, 22 Nov 2024 22:15:43 +0000 (23:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:25 +0000 (19:51 +0100)
commit46e062d62674871478b66c4feacb4b350c55e83c
treeab817247f224c716ab3e6dddbea13730d8ba9234
parent48d8223ff178d8e74e3b368874e474f226e8fff5
can: sun4i_can: sun4i_can_err(): call can_change_state() even if cf is NULL

[ Upstream commit ee6bf3677ae03569d833795064e17f605c2163c7 ]

Call the function can_change_state() if the allocation of the skb
fails, as it handles the cf parameter when it is null.

Additionally, this ensures that the statistics related to state error
counters (i. e. warning, passive, and bus-off) are updated.

Fixes: 0738eff14d81 ("can: Allwinner A10/A20 CAN Controller support - Kernel module")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://patch.msgid.link/20241122221650.633981-3-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/sun4i_can.c