]> git.baikalelectronics.ru Git - kernel.git/commit
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 31 Oct 2018 13:15:13 +0000 (14:15 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 9 Nov 2018 16:20:46 +0000 (17:20 +0100)
commitbcd7f5c44f39baa8bf3e047775cd3f34a4c0d3d4
tree388d431f4cf4512814f35ad4d4b073c4ce7ad46c
parent492c22e2d030ba43d0f5fd6c76974a6abb279412
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb

Prior to echoing a successfully transmitted CAN frame (by calling
can_get_echo_skb()), CAN drivers have to put the CAN frame (by calling
can_put_echo_skb() in the transmit function). These put and get function
take an index as parameter, which is used to identify the CAN frame.

A driver calling can_get_echo_skb() with a index not pointing to a skb
is a BUG, so add an appropriate error message.

Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c