Skip to content

Commit

Permalink
Bluetooth: mgmt: Fix return value of add/remove_uuid
Browse files Browse the repository at this point in the history
The Add/Remove UUID commands should return the device class instead of
an empty parameter list.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Feb 23, 2012
1 parent 504c8dc commit 9997a53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ static int add_uuid(struct sock *sk, u16 index, void *data, u16 len)
if (err < 0)
goto failed;

err = cmd_complete(sk, index, MGMT_OP_ADD_UUID, 0, NULL, 0);
err = cmd_complete(sk, index, MGMT_OP_ADD_UUID, 0, hdev->dev_class, 3);

failed:
hci_dev_unlock(hdev);
Expand Down Expand Up @@ -1428,7 +1428,8 @@ static int remove_uuid(struct sock *sk, u16 index, void *data, u16 len)
if (err < 0)
goto unlock;

err = cmd_complete(sk, index, MGMT_OP_REMOVE_UUID, 0, NULL, 0);
err = cmd_complete(sk, index, MGMT_OP_REMOVE_UUID, 0,
hdev->dev_class, 3);

unlock:
hci_dev_unlock(hdev);
Expand Down

0 comments on commit 9997a53

Please sign in to comment.