OSDN Git Service

can: flexcan: increase error counters if skb enqueueing via can_rx_offload_queue_sort...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 15 Jul 2019 18:53:08 +0000 (20:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:19:43 +0000 (09:19 +0100)
commit24e10fc2e0db64a87853f868f5c8dafac469ec8a
tree9750dfadfa750ec50e72a636fbac71c5fb0d7f34
parentee798153829321cc25fcdd86f1e3e74accc4b0b6
can: flexcan: increase error counters if skb enqueueing via can_rx_offload_queue_sorted() fails

[ Upstream commit 758124335a9dd649ab820bfb5b328170919ee7dc ]

The call to can_rx_offload_queue_sorted() may fail and return an error
(in the current implementation due to resource shortage). The passed skb
is consumed.

This patch adds incrementing of the appropriate error counters to let
the device statistics reflect that there's a problem.

Reported-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/flexcan.c