can: c_can: Handle state change correctly
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 Apr 2014 08:13:12 +0000 (08:13 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Apr 2014 20:08:56 +0000 (22:08 +0200)
commitf058d548e8071a1d148d6ebd94888d011c3ca71e
tree57640ef92b3896fc7801f0443cbbf441fdf17085
parent9c64863a49bd23c5a3a983680eb500f7796c81be
can: c_can: Handle state change correctly

If the allocation of an error skb fails, the state change handling
returns w/o doing any work. That leaves the interface in a wreckaged
state as the internal status is wrong.

Split the interface handling and the skb handling.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c