]> git.karo-electronics.de Git - linux-beck.git/commit
can: kvaser_usb: Update interface state before exiting on OOM
authorAhmed S. Darwish <ahmed.darwish@valeo.com>
Mon, 26 Jan 2015 05:27:19 +0000 (07:27 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 28 Jan 2015 12:39:37 +0000 (13:39 +0100)
commit3b07a444ee48a8081d2ed3f0abeeabd038404ac1
treeea72a3af95e8f495b736d3c684d464c708673462
parentff660f75be36e6db75d45dc742a4a468c5a9c20d
can: kvaser_usb: Update interface state before exiting on OOM

Update all of the can interface's state and error counters before
trying any skb allocation that can actually fail with -ENOMEM.

Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Acked-by: Andri Yngvason <andri.yngvason@marel.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb.c