summaryrefslogtreecommitdiff
path: root/android/handsfree.c
diff options
context:
space:
mode:
Diffstat (limited to 'android/handsfree.c')
-rw-r--r--android/handsfree.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/android/handsfree.c b/android/handsfree.c
index 2f8a86721..cb348ab9f 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -228,8 +228,6 @@ static struct hf_device *device_create(const bdaddr_t *bdaddr)
struct hf_device *dev;
dev = new0(struct hf_device, 1);
- if (!dev)
- return NULL;
bacpy(&dev->bdaddr, bdaddr);
dev->setup_state = HAL_HANDSFREE_CALL_STATE_IDLE;
@@ -240,10 +238,7 @@ static struct hf_device *device_create(const bdaddr_t *bdaddr)
init_codecs(dev);
- if (!queue_push_head(devices, dev)) {
- free(dev);
- return NULL;
- }
+ queue_push_head(devices, dev);
return dev;
}
@@ -2968,8 +2963,6 @@ bool bt_handsfree_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode,
return false;
devices = queue_new();
- if (!devices)
- return false;
if (!enable_hsp_ag())
goto failed_queue;