From f1bedd01c16c39edfab5058d2c38d6464ef8039d Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Wed, 14 Dec 2022 20:30:27 +0100 Subject: [PATCH] Bluetooth: ISO: Remove wrong requirement for cc_len The hci_le_setup_iso_data_path function required that if the path->cc was set, the length could not be 0. There is no reason why it should not be allowed to be 0 in that case. Signed-off-by: Emil Gydesen --- subsys/bluetooth/host/iso.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/iso.c b/subsys/bluetooth/host/iso.c index 35dec7df104..c3ff5ee9df7 100644 --- a/subsys/bluetooth/host/iso.c +++ b/subsys/bluetooth/host/iso.c @@ -207,8 +207,7 @@ static int hci_le_setup_iso_data_path(const struct bt_conn *iso, uint8_t dir, dir == BT_HCI_DATAPATH_DIR_CTLR_TO_HOST, "invalid ISO data path dir: %u", dir); - if ((path->cc == NULL && path->cc_len != 0) || - (path->cc != NULL && path->cc_len == 0)) { + if ((path->cc == NULL && path->cc_len != 0)) { LOG_DBG("Invalid ISO data path CC: %p %u", path->cc, path->cc_len); return -EINVAL;