Skip to content

Commit

Permalink
Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC
Browse files Browse the repository at this point in the history
We are allowed to sleep here so no need to use GFP_ATOMIC. The caller
(ath3k_probe) calls request_firmware() which definitely sleeps. Hence, we should
avoid using GFP_ATOMIC.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
David Herrmann authored and Gustavo F. Padovan committed Nov 7, 2011
1 parent df164df commit 52a1020
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/bluetooth/ath3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static int ath3k_load_firmware(struct usb_device *udev,

pipe = usb_sndctrlpipe(udev, 0);

send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
if (!send_buf) {
BT_ERR("Can't allocate memory chunk for firmware");
return -ENOMEM;
Expand Down Expand Up @@ -177,7 +177,7 @@ static int ath3k_load_fwfile(struct usb_device *udev,

count = firmware->size;

send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
if (!send_buf) {
BT_ERR("Can't allocate memory chunk for firmware");
return -ENOMEM;
Expand Down

0 comments on commit 52a1020

Please sign in to comment.