]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: c_can: c_can_handle_bus_err(): update statistics if skb allocation fails
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Fri, 22 Nov 2024 22:15:42 +0000 (23:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:01 +0000 (20:03 +0100)
commitcdf85e7c979c628577caae05bf9cf8186a8a3204
treed3dd9bf35afb647fa37320321f7a9d84c147eaaf
parentfc2aeda8c9f75c1c55556a262c13bf4874b7566d
can: c_can: c_can_handle_bus_err(): update statistics if skb allocation fails

[ Upstream commit 9e66242504f49e17481d8e197730faba7d99c934 ]

Ensure that the statistics are always updated, even if the skb
allocation fails.

Fixes: 4d6d26537940 ("can: c_can: fix {rx,tx}_errors statistics")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://patch.msgid.link/20241122221650.633981-2-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/c_can/c_can_main.c