From: Zijun Hu Date: Mon, 23 Jun 2025 12:31:18 +0000 (+0800) Subject: Bluetooth: hci_core: Eliminate an unnecessary goto label in hci_find_irk_by_addr() X-Git-Tag: io_uring-6.17-20250815~128^2~31^2~31 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=88d6ba89d86404073dc3cb711203c02b0754b166;p=linux-block.git 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 Signed-off-by: Luiz Augusto von Dentz --- 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",