diff --git a/subsys/bluetooth/controller/ll_sw/ull.c b/subsys/bluetooth/controller/ll_sw/ull.c index ccb2329b764..335c4667c85 100644 --- a/subsys/bluetooth/controller/ll_sw/ull.c +++ b/subsys/bluetooth/controller/ll_sw/ull.c @@ -1035,14 +1035,19 @@ int ull_disable(void *lll) u32_t ret; hdr = HDR_ULL(((struct lll_hdr *)lll)->parent); - if (!hdr || !hdr->ref) { + if (!hdr) { return ULL_STATUS_SUCCESS; } k_sem_init(&sem, 0, 1); + hdr->disabled_param = &sem; hdr->disabled_cb = disabled_cb; + if (!hdr->ref) { + return ULL_STATUS_SUCCESS; + } + mfy.param = lll; ret = mayfly_enqueue(TICKER_USER_ID_THREAD, TICKER_USER_ID_LLL, 0, &mfy);