Skip to content

Commit

Permalink
Bluetooth: ISO: Pointer check in bt_iso_connected was incorrect
Browse files Browse the repository at this point in the history
Instead of checking `if (iso == NULL)` it simply checked
`if (iso)` which is the opposite of what it should have done.

This completely blocks iso from connecting channels.

Signed-off-by: Emil Gydesen <[email protected]>
  • Loading branch information
Thalley authored and nashif committed Sep 1, 2021
1 parent 7cfedb9 commit 0c7eda9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void bt_iso_connected(struct bt_conn *iso)
{
struct bt_iso_chan *chan;

if (iso || iso->type != BT_CONN_TYPE_ISO) {
if (iso == NULL || iso->type != BT_CONN_TYPE_ISO) {
BT_DBG("Invalid parameters: iso %p iso->type %u", iso,
iso ? iso->type : 0);
return;
Expand Down

0 comments on commit 0c7eda9

Please sign in to comment.