can: c_can: c_can_handle_bus_err(): update statistics if skb allocation fails

[ Upstream commit 9e66242504 ]

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

Fixes: 4d6d265379 ("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>
This commit is contained in:
Dario Binacchi 2024-11-22 23:15:42 +01:00 • committed by Greg Kroah-Hartman
commit c146df8292