diff --git a/samples/bluetooth/hap_ha/src/bap_unicast_sr.c b/samples/bluetooth/hap_ha/src/bap_unicast_sr.c index b6c1de0a1b0..dd32065ecb6 100644 --- a/samples/bluetooth/hap_ha/src/bap_unicast_sr.c +++ b/samples/bluetooth/hap_ha/src/bap_unicast_sr.c @@ -297,12 +297,7 @@ static bool valid_metadata_type(uint8_t type, uint8_t len) } return true; - case BT_AUDIO_METADATA_TYPE_CCID_LIST: /* 2 - 254 octets */ - if (len < 2) { - return false; - } - - return true; + case BT_AUDIO_METADATA_TYPE_CCID_LIST: case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO: /* 0 - 255 octets */ case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI: /* 0 - 255 octets */ return true; diff --git a/samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c b/samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c index efecfaec92f..645c32875b7 100644 --- a/samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c +++ b/samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c @@ -246,12 +246,7 @@ static bool valid_metadata_type(uint8_t type, uint8_t len) } return true; - case BT_AUDIO_METADATA_TYPE_CCID_LIST: /* 2 - 254 octets */ - if (len < 2) { - return false; - } - - return true; + case BT_AUDIO_METADATA_TYPE_CCID_LIST: case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO: /* 0 - 255 octets */ case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI: /* 0 - 255 octets */ return true; diff --git a/samples/bluetooth/unicast_audio_server/src/main.c b/samples/bluetooth/unicast_audio_server/src/main.c index 8197a9f5e31..1c340689cd1 100644 --- a/samples/bluetooth/unicast_audio_server/src/main.c +++ b/samples/bluetooth/unicast_audio_server/src/main.c @@ -438,12 +438,7 @@ static bool valid_metadata_type(uint8_t type, uint8_t len) } return true; - case BT_AUDIO_METADATA_TYPE_CCID_LIST: /* 2 - 254 octets */ - if (len < 2) { - return false; - } - - return true; + case BT_AUDIO_METADATA_TYPE_CCID_LIST: case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO: /* 0 - 255 octets */ case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI: /* 0 - 255 octets */ return true; diff --git a/subsys/bluetooth/audio/shell/bap.c b/subsys/bluetooth/audio/shell/bap.c index c45333b97cb..a68f354f6b7 100644 --- a/subsys/bluetooth/audio/shell/bap.c +++ b/subsys/bluetooth/audio/shell/bap.c @@ -518,12 +518,7 @@ static bool valid_metadata_type(uint8_t type, uint8_t len) } return true; - case BT_AUDIO_METADATA_TYPE_CCID_LIST: /* 2 - 254 octets */ - if (len < 2) { - return false; - } - - return true; + case BT_AUDIO_METADATA_TYPE_CCID_LIST: case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO: /* 0 - 255 octets */ case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI: /* 0 - 255 octets */ return true; diff --git a/tests/bluetooth/tester/src/btp_bap.c b/tests/bluetooth/tester/src/btp_bap.c index 4ef9f1b68f9..e1eba8d2aea 100644 --- a/tests/bluetooth/tester/src/btp_bap.c +++ b/tests/bluetooth/tester/src/btp_bap.c @@ -360,12 +360,7 @@ static bool valid_metadata_type(uint8_t type, uint8_t len, const uint8_t *data) } return true; - case BT_AUDIO_METADATA_TYPE_CCID_LIST: /* 2 - 254 octets */ - if (len < 2) { - return false; - } - - return true; + case BT_AUDIO_METADATA_TYPE_CCID_LIST: case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO: /* 0 - 255 octets */ case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI: /* 0 - 255 octets */ return true; diff --git a/tests/bsim/bluetooth/audio/src/bap_unicast_server_test.c b/tests/bsim/bluetooth/audio/src/bap_unicast_server_test.c index 88ab2fd7164..e97c6b24de3 100644 --- a/tests/bsim/bluetooth/audio/src/bap_unicast_server_test.c +++ b/tests/bsim/bluetooth/audio/src/bap_unicast_server_test.c @@ -189,12 +189,7 @@ static bool valid_metadata_type(uint8_t type, uint8_t len) } return true; - case BT_AUDIO_METADATA_TYPE_CCID_LIST: /* 2 - 254 octets */ - if (len < 2) { - return false; - } - - return true; + case BT_AUDIO_METADATA_TYPE_CCID_LIST: case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO: /* 0 - 255 octets */ case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI: /* 0 - 255 octets */ return true; diff --git a/tests/bsim/bluetooth/audio/src/cap_acceptor_test.c b/tests/bsim/bluetooth/audio/src/cap_acceptor_test.c index eae27963e58..1ea1b9f8abf 100644 --- a/tests/bsim/bluetooth/audio/src/cap_acceptor_test.c +++ b/tests/bsim/bluetooth/audio/src/cap_acceptor_test.c @@ -354,12 +354,7 @@ static bool valid_metadata_type(uint8_t type, uint8_t len) } return true; - case BT_AUDIO_METADATA_TYPE_CCID_LIST: /* 2 - 254 octets */ - if (len < 2) { - return false; - } - - return true; + case BT_AUDIO_METADATA_TYPE_CCID_LIST: case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO: /* 0 - 255 octets */ case BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI: /* 0 - 255 octets */ return true;