Bluetooth: Remove bogus check for pending mgmt Set HS command
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 19 Feb 2015 15:38:06 +0000 (17:38 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 19 Feb 2015 16:05:09 +0000 (17:05 +0100)
The command handler for Set HS doesn't use mgmt_pending_add() so we can
never have a pending Set HS command that mgmt_pending_find() would
return. This patch removes an unnecessary lookup for it in the set_ssp()
handler function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c

index 1b528de..cc67d19 100644 (file)
@@ -2116,8 +2116,7 @@ static int set_ssp(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
                goto failed;
        }
 
-       if (mgmt_pending_find(MGMT_OP_SET_SSP, hdev) ||
-           mgmt_pending_find(MGMT_OP_SET_HS, hdev)) {
+       if (mgmt_pending_find(MGMT_OP_SET_SSP, hdev)) {
                err = cmd_status(sk, hdev->id, MGMT_OP_SET_SSP,
                                 MGMT_STATUS_BUSY);
                goto failed;