]> 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 18:51:25 +0000 (19:51 +0100)
commit48d8223ff178d8e74e3b368874e474f226e8fff5
treeb244f6b76ab9727b46e0dadc77956653b06ddcf5
parentf1977d763c9c1ff742a4d81e3cfce302e46f3d63
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