staging: octeon-usb: call device_unregister when platform_device_register_simple...
authorDevendra Naga <devendra.aaru@gmail.com>
Mon, 3 Jun 2013 21:16:21 +0000 (02:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jun 2013 22:25:42 +0000 (15:25 -0700)
commit5e15430eaf0168d32df6d0dcacabdbab0448fb67
treecc27021151f99b160c3dfd977a3d49357149a2d6
parent55fa328aecb1daf9134278b0eb660502627bf60e
staging: octeon-usb: call device_unregister when platform_device_register_simple fails

device_register is called before platform_device_register_simple gets called.
unregister and reset the octeon_usb_registered variable

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon-usb/octeon-hcd.c