aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/mgmt.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index a849428ffbcb..a6720c6a4d2c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -268,9 +268,6 @@ static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
268 if (opcode > 0 && cmd->opcode != opcode) 268 if (opcode > 0 && cmd->opcode != opcode)
269 continue; 269 continue;
270 270
271 if (hdev && cmd->index != hdev->id)
272 continue;
273
274 cb(cmd, data); 271 cb(cmd, data);
275 } 272 }
276} 273}
@@ -280,13 +277,8 @@ static struct pending_cmd *mgmt_pending_find(u16 opcode, struct hci_dev *hdev)
280 struct pending_cmd *cmd; 277 struct pending_cmd *cmd;
281 278
282 list_for_each_entry(cmd, &hdev->mgmt_pending, list) { 279 list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
283 if (cmd->opcode != opcode) 280 if (cmd->opcode == opcode)
284 continue; 281 return cmd;
285
286 if (hdev && cmd->index != hdev->id)
287 continue;
288
289 return cmd;
290 } 282 }
291 283
292 return NULL; 284 return NULL;
@@ -1300,9 +1292,6 @@ static inline struct pending_cmd *find_pairing(struct hci_conn *conn)
1300 if (cmd->opcode != MGMT_OP_PAIR_DEVICE) 1292 if (cmd->opcode != MGMT_OP_PAIR_DEVICE)
1301 continue; 1293 continue;
1302 1294
1303 if (cmd->index != hdev->id)
1304 continue;
1305
1306 if (cmd->user_data != conn) 1295 if (cmd->user_data != conn)
1307 continue; 1296 continue;
1308 1297