Skip to content

Commit 0dc9f57

Browse files
Thalleycarlescufi
authored andcommitted
Bluetooth: Audio: Fix bad error check for bt_unicast_client_start
If bt_audio_stream_connect didn't fail, we would just return without sending the receive start ready command. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 4a2033a commit 0dc9f57

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

subsys/bluetooth/audio/stream.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,6 @@ int bt_audio_stream_connect(struct bt_audio_stream *stream)
714714
case BT_ISO_STATE_DISCONNECTED:
715715
return bt_iso_chan_connect(&param, 1);
716716
case BT_ISO_STATE_CONNECTING:
717-
return 0;
718717
case BT_ISO_STATE_CONNECTED:
719718
return -EALREADY;
720719
default:

subsys/bluetooth/audio/unicast_client.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,10 +1710,6 @@ int bt_unicast_client_start(struct bt_audio_stream *stream)
17101710
* Central Establishment procedure.
17111711
*/
17121712
err = bt_audio_stream_connect(stream);
1713-
if (!err) {
1714-
return 0;
1715-
}
1716-
17171713
if (err && err != -EALREADY) {
17181714
BT_DBG("bt_audio_stream_connect failed: %d", err);
17191715
return err;

0 commit comments

Comments
 (0)