]> git.baikalelectronics.ru Git - kernel.git/commit
can: dev: make can_change_state() robust to be called with cf == NULL
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 18 May 2017 08:22:22 +0000 (10:22 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 9 Jun 2017 09:39:23 +0000 (11:39 +0200)
commit4a11ab03d45a0caf803f3fbb17f0af5fdf800a84
treef90733085bb44784ab6d8175cd3830aad4e5d93c
parent0aa6fa215a9b972b026e4f467ce05df1ae1f938c
can: dev: make can_change_state() robust to be called with cf == NULL

In OOM situations where no skb can be allocated, can_change_state() may
be called with cf == NULL. As this function updates the state and error
statistics it's not an option to skip the call to can_change_state() in
OOM situations.

This patch makes can_change_state() robust, so that it can be called
with cf == NULL.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c