diff options
author | Zijun Hu <zijun.hu@oss.qualcomm.com> | 2025-06-23 20:31:18 +0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2025-07-23 10:26:04 -0400 |
commit | 88d6ba89d86404073dc3cb711203c02b0754b166 (patch) | |
tree | ca89cd8dd8586377a57a198c9d4f312917d05f2c | |
parent | da0186f19a7433d3d5607b0f61e9a3de17d1f721 (diff) |
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: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-rw-r--r-- | net/bluetooth/hci_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 441cb1700f99..f2fbe9c8e1be 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -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", |