Commit c57ba529 authored by Mariusz Skamra's avatar Mariusz Skamra Committed by Carles Cufi
Browse files

Bluetooth: audio: ascs: Remove invalid check



This fixes invalid check, which is redundant in fact as the length
is already checked in ascs_parse_metadata function.
The check be test 'greater than' only, as 'equal' condition is valid.
Moreover this fixes return value from ascs_verify_metadata function.

Signed-off-by: default avatarMariusz Skamra <mariusz.skamra@codecoup.pl>
parent 5f8168d5
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -1641,12 +1641,7 @@ static int ascs_verify_metadata(const struct net_buf_simple *buf,
		return -EINVAL;
	}

	if (result.count >= CONFIG_BT_CODEC_MAX_METADATA_COUNT) {
		BT_ERR("No slot available for Codec Config Metadata");
		return -ENOMEM;
	}

	return 0;
	return result.err;
}

int ascs_ep_set_metadata(struct bt_audio_ep *ep,