Skip to content

Commit

Permalink
samples: Bluetooth: Unicast client missing err check on sem
Browse files Browse the repository at this point in the history
Added missing error check when taking the sem_stream_qos.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
  • Loading branch information
Thalley authored and carlescufi committed Jun 22, 2023
1 parent 3ede93f commit 969d279
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion samples/bluetooth/unicast_audio_client/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,11 @@ static int set_stream_qos(void)

for (size_t i = 0U; i < configured_stream_count; i++) {
printk("QoS: waiting for %zu streams\n", configured_stream_count);
k_sem_take(&sem_stream_qos, K_FOREVER);
err = k_sem_take(&sem_stream_qos, K_FOREVER);
if (err != 0) {
printk("failed to take sem_stream_qos (err %d)\n", err);
return err;
}
}

return 0;
Expand Down

0 comments on commit 969d279

Please sign in to comment.