]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 14 Jan 2015 13:42:52 +0000 (14:42 +0100)
commite1f20f1d2fa56de8dfff0d7fcfe26609fa55cae6
tree99c2f14d5948fc971baa05792b461c56de038fe4
parent5dc24dd1e87703800d669192643ead195d080b52
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: Jiri Slaby <jslaby@suse.cz>
drivers/net/can/usb/peak_usb/pcan_usb_core.c