can: c_can: Handle state change correctly
authorThomas Gleixner <[email protected]>
Fri, 11 Apr 2014 08:13:12 +0000 (08:13 +0000)
committerMarc Kleine-Budde <[email protected]>
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 <[email protected]>
Tested-by: Alexander Stein <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
drivers/net/can/c_can/c_can.c