samples: Bluetooth: Unicast client missing err check on sem

Added missing error check when taking the sem_stream_qos.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2023-06-20 11:19:52 +02:00 committed by Carles Cufí
parent 3ede93f166
commit 969d279190

View file

@ -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;