From 77ad24fd66bb1d22c560c0c568328646beb71add Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Mon, 7 Oct 2019 09:52:59 +0200 Subject: [PATCH] nimble/ll: Remove unneeded null check scansm is always valid here. --- nimble/controller/src/ble_ll_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c index 36de954bf..edd6fd78d 100644 --- a/nimble/controller/src/ble_ll_scan.c +++ b/nimble/controller/src/ble_ll_scan.c @@ -518,7 +518,7 @@ ble_ll_scan_clean_cur_aux_data(void) struct ble_ll_scan_sm *scansm = &g_ble_ll_scan_sm; /* If scanner was reading aux ptr, we need to clean it up */ - if (scansm && scansm->cur_aux_data) { + if (scansm->cur_aux_data) { ble_ll_scan_end_adv_evt(scansm->cur_aux_data); ble_ll_scan_aux_data_unref(scansm->cur_aux_data); scansm->cur_aux_data = NULL;