]> git.ipfire.org Git - people/arne_f/kernel.git/commit
can: peak_usb: fix cleanup sequence order in case of error during init
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 28 Nov 2014 12:49:10 +0000 (13:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2015 14:59:29 +0000 (06:59 -0800)
commita9690a5a68838883bebadd334354cf51ea6be5d9
tree86301a2b3450d9be9a32f22c2bce388f430a594a
parentcc0d0d5e64a140ad26bb6f37bf7b224e6fde3312
can: peak_usb: fix cleanup sequence order in case of error during init

commit af35d0f1cce7a990286e2b94c260a2c2d2a0e4b0 upstream.

This patch sets the correct reverse sequence order to the instructions
set to run, when any failure occurs during the initialization steps.
It also adds the missing unregistration call of the can device if the
failure appears after having been registered.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/peak_usb/pcan_usb_core.c