bluetooth: audio: broadcast source: Add missing check condition

There is no need to validate stream_param->data if it is NULL.
Fixes failing PTS BAP/BSRC test cases.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
This commit is contained in:
Magdalena Kasenberg 2024-03-12 14:09:06 +01:00 committed by David Leach
commit dba205a2ce

View file

@ -594,7 +594,8 @@ static bool valid_broadcast_source_param(const struct bt_bap_broadcast_source_pa
return false;
}
CHECKIF(subgroup_param->codec_cfg->id == BT_HCI_CODING_FORMAT_LC3 &&
CHECKIF(stream_param->data != NULL &&
subgroup_param->codec_cfg->id == BT_HCI_CODING_FORMAT_LC3 &&
!bt_audio_valid_ltv(stream_param->data, stream_param->data_len)) {
LOG_DBG("subgroup_params[%zu].stream_params[%zu]->data not valid "
"LTV",