]> git.baikalelectronics.ru Git - kernel.git/commit
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, 31 Oct 2011 19:52:35 +0000 (17:52 -0200)
commitb40c020f7d8fb18c6317be01a2bf0058a137c8d4
tree776a0542aab86f162cfdfc824250f3a70803cd25
parent6d909bae87e6d042d0ab88ad666b3161d6d0e870
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