From 9a6d200cb90afd992d12fbc514f87fe4eae54203 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Wed, 15 Jan 2020 17:53:19 +0530 Subject: [PATCH] Bluetooth: controller: legacy: Fix redundant priv variable check Fix the redundant check of priv flag variable introduced as regression in commit f8877e39ced9 ("Bluetooth: controller: legacy: Fix controller address check"). Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ll_adv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/ll_adv.c b/subsys/bluetooth/controller/ll_sw/ll_adv.c index 09d2df27dc1..bedc0e352b6 100644 --- a/subsys/bluetooth/controller/ll_sw/ll_adv.c +++ b/subsys/bluetooth/controller/ll_sw/ll_adv.c @@ -478,8 +478,8 @@ u8_t ll_adv_enable(u8_t enable) * found the fallback address was used instead, check * that a valid address has been set. */ - if ((priv || pdu_adv->tx_addr) && - !mem_nz(&pdu_adv->adv_ind.addr[0], BDADDR_SIZE)) { + if (pdu_adv->tx_addr && + !mem_nz(pdu_adv->adv_ind.addr, BDADDR_SIZE)) { return BT_HCI_ERR_INVALID_PARAM; } }