mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Bluetooth: Use GFP_KERNEL in mgmt_pending_add
We are allowed to sleep in mgmt_pending_add, so we should use GFP_KERNEL for memory allocations instead of GFP_ATOMIC. Signed-off-by: Andre Guedes <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
This commit is contained in:
parent
92c4c20497
commit
12b9456502
1 changed files with 2 additions and 2 deletions
|
|
@ -687,14 +687,14 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
|
|||
{
|
||||
struct pending_cmd *cmd;
|
||||
|
||||
cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
|
||||
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
|
||||
if (!cmd)
|
||||
return NULL;
|
||||
|
||||
cmd->opcode = opcode;
|
||||
cmd->index = hdev->id;
|
||||
|
||||
cmd->param = kmalloc(len, GFP_ATOMIC);
|
||||
cmd->param = kmalloc(len, GFP_KERNEL);
|
||||
if (!cmd->param) {
|
||||
kfree(cmd);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue