From: Balraj Selvaraj Date: Wed, 21 Oct 2015 14:14:04 +0000 (+0530) Subject: Bluetooth: Gap: Adding NULL check in HAL interface X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b412e09133289583e4e1204ebc40d8109c97f6a3;p=android-x86%2Fsystem-bt.git Bluetooth: Gap: Adding NULL check in HAL interface When the HCI_RAW_CMD support is included, adding NULL check for bt_hal_cbacks and hci_event_recv_cb in btif_hci_event_cback to avoid ASSERT message continuosly which is consuming more power. CRs-Fixed: 922611 Change-Id: I995e6411012fe515ca725267045a97076b692b7d --- diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c index e86082c16..2f414fbf1 100644 --- a/btif/src/btif_core.c +++ b/btif/src/btif_core.c @@ -726,7 +726,8 @@ bt_status_t btif_cleanup_bluetooth(void) static void btif_hci_event_cback ( tBTM_RAW_CMPL *p ) { BTIF_TRACE_DEBUG("%s", __FUNCTION__); - if(p != NULL) + if((p != NULL) && (bt_hal_cbacks != NULL) + && (bt_hal_cbacks->hci_event_recv_cb != NULL)) { HAL_CBACK(bt_hal_cbacks, hci_event_recv_cb, p->event_code, p->p_param_buf, p->param_len);