X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fbluetooth%2Fmgmt.c;h=39395c7144aa16d0402ae9a71ecd2cd248a1affa;hb=e23b62256a361611cbd45cd1456638f1a5106b5c;hp=3bd4c41c6a1b4d5533f049459f3de4be3b1a51c4;hpb=3810285cf8cef5c3f9c4334a317b71b876125269;p=karo-tx-linux.git diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3bd4c41c6a1b..39395c7144aa 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -760,13 +760,9 @@ static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev, void *data), void *data) { - struct list_head *p, *n; - - list_for_each_safe(p, n, &hdev->mgmt_pending) { - struct pending_cmd *cmd; - - cmd = list_entry(p, struct pending_cmd, list); + struct pending_cmd *cmd, *tmp; + list_for_each_entry_safe(cmd, tmp, &hdev->mgmt_pending, list) { if (opcode > 0 && cmd->opcode != opcode) continue;