Bluetooth: bfusb: Fix error path on firmware load
authorDavid Herrmann <dh.herrmann@googlemail.com>
Wed, 26 Oct 2011 09:22:46 +0000 (11:22 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 7 Nov 2011 19:24:54 +0000 (17:24 -0200)
commit7f103a0d23d2778b86cea407c1992522d41ead81
treec8319c639e4bef02ab88bdf35ff080a3b3850040
parentdeceb024f1083d7eecaba7f2ee65d57f31f91bd5
Bluetooth: bfusb: Fix error path on firmware load

When loading the usb-configuration we do not signal the end of configuration on
memory allocation error. This patch moves the memory allocation to the top so
every error path uses "goto error" now to correctly send the usb-ctrl message
when detecting some error.

This also replaces GFP_ATOMIC with GFP_KERNEL as we are allowed to sleep here.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
drivers/bluetooth/bfusb.c