diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-10-23 13:16:17 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-10-23 13:16:17 +0300 |
commit | 89a85ed6a82dca6f53fa82ad5049f907432c37bc (patch) | |
tree | be4d13c94412eae559af1138b5779835738d255f /android/hal-hidhost.c | |
parent | 2f1277b170a644dccd5006af90eb1a35f0e27a7a (diff) | |
download | bluez-89a85ed6a82dca6f53fa82ad5049f907432c37bc.tar.gz |
android: Fix checking return of hal_ipc_cmd
hal_ipc_cmd should never return negative values
Diffstat (limited to 'android/hal-hidhost.c')
-rw-r--r-- | android/hal-hidhost.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c index a65f24418..a7af27a2e 100644 --- a/android/hal-hidhost.c +++ b/android/hal-hidhost.c @@ -263,6 +263,7 @@ static bt_status_t hh_send_data(bt_bdaddr_t *bd_addr, char *data) static bt_status_t hh_init(bthh_callbacks_t *callbacks) { struct hal_msg_cmd_register_module cmd; + DBG(""); /* store reference to user callbacks */ @@ -270,14 +271,8 @@ static bt_status_t hh_init(bthh_callbacks_t *callbacks) cmd.service_id = HAL_SERVICE_ID_HIDHOST; - if (hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_MSG_OP_REGISTER_MODULE, - sizeof(cmd), &cmd, 0, NULL, NULL) < 0) { - error("Failed to register 'hidhost'' service"); - - return BT_STATUS_FAIL; - } - - return BT_STATUS_SUCCESS; + return hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_MSG_OP_REGISTER_MODULE, + sizeof(cmd), &cmd, 0, NULL, NULL); } static void hh_cleanup(void) |