[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250623-bt_cleanup-v1-3-5d3d171e3822@oss.qualcomm.com>
Date: Mon, 23 Jun 2025 20:31:18 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Marcel Holtmann <marcel@...tmann.org>,
Johan Hedberg <johan.hedberg@...il.com>,
Luiz Augusto von Dentz <luiz.dentz@...il.com>
Cc: Zijun Hu <zijun_hu@...oud.com>, linux-bluetooth@...r.kernel.org,
linux-kernel@...r.kernel.org, Zijun Hu <zijun.hu@....qualcomm.com>
Subject: [PATCH 3/4] Bluetooth: hci_core: Eliminate an unnecessary goto
label in hci_find_irk_by_addr()
From: Zijun Hu <zijun.hu@....qualcomm.com>
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@....qualcomm.com>
---
net/bluetooth/hci_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index ce1d8c997a31529996ad98f22ec0997ed3ac9b36..9af4d7345e4df1d715fdab7427a700007303f65e 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",
--
2.34.1
Powered by blists - more mailing lists