Commit 18d88f0f authored by Dan Carpenter's avatar Dan Carpenter Committed by Luiz Augusto von Dentz

Bluetooth: ISO: Clean up returns values in iso_connect_ind()

This function either returns 0 or HCI_LM_ACCEPT.  Make it clearer which
returns are which and delete the "lm" variable because it is no longer
required.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 947ec0d0
...@@ -1910,7 +1910,6 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags) ...@@ -1910,7 +1910,6 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
struct hci_evt_le_big_info_adv_report *ev2; struct hci_evt_le_big_info_adv_report *ev2;
struct hci_ev_le_per_adv_report *ev3; struct hci_ev_le_per_adv_report *ev3;
struct sock *sk; struct sock *sk;
int lm = 0;
bt_dev_dbg(hdev, "bdaddr %pMR", bdaddr); bt_dev_dbg(hdev, "bdaddr %pMR", bdaddr);
...@@ -1954,7 +1953,7 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags) ...@@ -1954,7 +1953,7 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
if (sk && test_bit(BT_SK_PA_SYNC_TERM, if (sk && test_bit(BT_SK_PA_SYNC_TERM,
&iso_pi(sk)->flags)) &iso_pi(sk)->flags))
return lm; return 0;
} }
if (sk) { if (sk) {
...@@ -2041,16 +2040,14 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags) ...@@ -2041,16 +2040,14 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
done: done:
if (!sk) if (!sk)
return lm; return 0;
lm |= HCI_LM_ACCEPT;
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))
*flags |= HCI_PROTO_DEFER; *flags |= HCI_PROTO_DEFER;
sock_put(sk); sock_put(sk);
return lm; return HCI_LM_ACCEPT;
} }
static void iso_connect_cfm(struct hci_conn *hcon, __u8 status) static void iso_connect_cfm(struct hci_conn *hcon, __u8 status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment