Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zijun Hu and committed by
Luiz Augusto von Dentz
88d6ba89 da0186f1

+1 -3
+1 -3
net/bluetooth/hci_core.c
··· 1256 1256 if (addr_type == irk->addr_type && 1257 1257 bacmp(bdaddr, &irk->bdaddr) == 0) { 1258 1258 irk_to_return = irk; 1259 - goto done; 1259 + break; 1260 1260 } 1261 1261 } 1262 - 1263 - done: 1264 1262 1265 1263 if (irk_to_return && hci_is_blocked_key(hdev, HCI_BLOCKED_KEY_TYPE_IRK, 1266 1264 irk_to_return->val)) {