Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: controller: Various coverity related fixes #35426

Merged
merged 3 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions subsys/bluetooth/controller/ll_sw/ull.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ void ll_rx_dequeue(void)
struct lll_adv_aux *lll_aux;

adv = ull_adv_set_get(rx->handle);
LL_ASSERT(adv);

lll_aux = adv->lll.aux;
if (lll_aux) {
struct ll_adv_aux_set *aux;
Expand Down
4 changes: 3 additions & 1 deletion subsys/bluetooth/controller/ll_sw/ull_adv_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ static void mfy_aux_offset_get(void *param)
uint32_t volatile ret_cb;
uint32_t ticks_previous;
uint32_t ret;
bool success;

ticks_previous = ticks_current;

Expand All @@ -1076,7 +1077,8 @@ static void mfy_aux_offset_get(void *param)
}
}

LL_ASSERT(ret_cb == TICKER_STATUS_SUCCESS);
success = (ret_cb == TICKER_STATUS_SUCCESS);
LL_ASSERT(success);

LL_ASSERT((ticks_current == ticks_previous) || retry--);

Expand Down
4 changes: 3 additions & 1 deletion subsys/bluetooth/controller/ll_sw/ull_adv_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ static void mfy_sync_offset_get(void *param)
uint32_t volatile ret_cb;
uint32_t ticks_previous;
uint32_t ret;
bool success;

ticks_previous = ticks_current;

Expand All @@ -923,7 +924,8 @@ static void mfy_sync_offset_get(void *param)
}
}

LL_ASSERT(ret_cb == TICKER_STATUS_SUCCESS);
success = (ret_cb == TICKER_STATUS_SUCCESS);
LL_ASSERT(success);

LL_ASSERT((ticks_current == ticks_previous) || retry--);

Expand Down
8 changes: 4 additions & 4 deletions subsys/bluetooth/controller/ll_sw/ull_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,8 @@ static void target_resolve(struct k_work *work)
if (twork->cb) {
mfy.fp = twork->cb;
mfy.param = (void *) ((unsigned int) j);
mayfly_enqueue(TICKER_USER_ID_THREAD,
TICKER_USER_ID_LLL, 1, &mfy);
(void)mayfly_enqueue(TICKER_USER_ID_THREAD,
TICKER_USER_ID_LLL, 1, &mfy);
}
}

Expand Down Expand Up @@ -1219,8 +1219,8 @@ static void prpa_cache_resolve(struct k_work *work)
if (rwork->cb) {
mfy.fp = rwork->cb;
mfy.param = (void *) ((unsigned int) j);
mayfly_enqueue(TICKER_USER_ID_THREAD,
TICKER_USER_ID_LLL, 1, &mfy);
(void)mayfly_enqueue(TICKER_USER_ID_THREAD,
TICKER_USER_ID_LLL, 1, &mfy);
}
}

Expand Down