Commit 88d6ba89 authored by Zijun Hu's avatar Zijun Hu Committed by Luiz Augusto von Dentz
Browse files

Bluetooth: hci_core: Eliminate an unnecessary goto label in hci_find_irk_by_addr()



Eliminate an unnecessary goto label by using break instead of goto to
exit the loop in hci_find_irk_by_addr().

Signed-off-by: default avatarZijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent da0186f1
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1256,12 +1256,10 @@ struct smp_irk *hci_find_irk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr,
		if (addr_type == irk->addr_type &&
		    bacmp(bdaddr, &irk->bdaddr) == 0) {
			irk_to_return = irk;
			goto done;
			break;
		}
	}

done:

	if (irk_to_return && hci_is_blocked_key(hdev, HCI_BLOCKED_KEY_TYPE_IRK,
						irk_to_return->val)) {
		bt_dev_warn_ratelimited(hdev, "Identity key blocked for %pMR",