Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277747
b: refs/heads/master
c: 889d07e
h: refs/heads/master
i:
  277745: 11e5821
  277743: b069c2f
v: v3
  • Loading branch information
Johan Hedberg authored and Gustavo F. Padovan committed Nov 8, 2011
1 parent dc37694 commit a5745b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3243553fdc108a0ef49b9e25bdea9c87b341413e
refs/heads/master: 889d07ee57e950790cbec81df7b4f9d8691ee0b4
21 changes: 0 additions & 21 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,6 @@ static int block_device(struct sock *sk, u16 index, unsigned char *data,
u16 len)
{
struct hci_dev *hdev;
struct pending_cmd *cmd;
struct mgmt_cp_block_device *cp = (void *) data;
int err;

Expand All @@ -1688,23 +1687,13 @@ static int block_device(struct sock *sk, u16 index, unsigned char *data,

hci_dev_lock_bh(hdev);

cmd = mgmt_pending_add(sk, MGMT_OP_BLOCK_DEVICE, index, NULL, 0);
if (!cmd) {
err = -ENOMEM;
goto failed;
}

err = hci_blacklist_add(hdev, &cp->bdaddr);

if (err < 0)
err = cmd_status(sk, index, MGMT_OP_BLOCK_DEVICE, -err);
else
err = cmd_complete(sk, index, MGMT_OP_BLOCK_DEVICE,
NULL, 0);

mgmt_pending_remove(cmd);

failed:
hci_dev_unlock_bh(hdev);
hci_dev_put(hdev);

Expand All @@ -1715,7 +1704,6 @@ static int unblock_device(struct sock *sk, u16 index, unsigned char *data,
u16 len)
{
struct hci_dev *hdev;
struct pending_cmd *cmd;
struct mgmt_cp_unblock_device *cp = (void *) data;
int err;

Expand All @@ -1732,12 +1720,6 @@ static int unblock_device(struct sock *sk, u16 index, unsigned char *data,

hci_dev_lock_bh(hdev);

cmd = mgmt_pending_add(sk, MGMT_OP_UNBLOCK_DEVICE, index, NULL, 0);
if (!cmd) {
err = -ENOMEM;
goto failed;
}

err = hci_blacklist_del(hdev, &cp->bdaddr);

if (err < 0)
Expand All @@ -1746,9 +1728,6 @@ static int unblock_device(struct sock *sk, u16 index, unsigned char *data,
err = cmd_complete(sk, index, MGMT_OP_UNBLOCK_DEVICE,
NULL, 0);

mgmt_pending_remove(cmd);

failed:
hci_dev_unlock_bh(hdev);
hci_dev_put(hdev);

Expand Down

0 comments on commit a5745b0

Please sign in to comment.