]> git.itanic.dy.fi Git - linux-stable/commit
can: at91_can: at91_poll_err(): increase stats even if no quota left or OOM
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 1 May 2023 16:14:41 +0000 (18:14 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 5 Oct 2023 19:46:56 +0000 (21:46 +0200)
commitaa3f5d935cbb302dce89e8f278f6e8a3e2ecea18
tree0d3b1d7776dd766af070c16f6c4548052f315121
parent864c6f07d3c4a4ed40fca932d9aec17607c6cc96
can: at91_can: at91_poll_err(): increase stats even if no quota left or OOM

at91_poll_err() allocates a can error SKB, to inform the user space
about the CAN error. Then it fills the SKB with information the error
information and increases the net device error stats.

In case no SBK can be allocated (e.g. due to an OOM) or the NAPI quota
is 0 the function is left early and no stats are updated. This is not
helpful to the user, as there is no information about the faulty CAN
bus.

Increase the error stats even if no quota is left or no SKB can be
allocated.

While there treat No-Acknowledgment as a bus error, too.

Link: https://lore.kernel.org/all/20231005-at91_can-rx_offload-v2-18-9987d53600e0@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/at91_can.c