Add error return values of bm_start_recording_event() and
rename return value 0 as BATTERY_MONITOR_ERROR_NONE of this function.
Change-Id: Ia620ea297b33b74e8a1cae9a2f3854707659df18
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
wakeup_hsp = 0; modem_hsp = 0; lock_ref_count = 0;
app_list = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+ if (!app_list) {
+ _ERR("Failed to create app-list table");
+ return -EWOULDBLOCK;
+ }
wakelock_list = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+ if (!wakelock_list) {
+ _ERR("Failed to create wakelock-list table");
+ g_hash_table_destroy(app_list);
+ app_list = NULL;
+ return -EWOULDBLOCK;
+ }
EXIT;
- return 0;
+ return BATTERY_MONITOR_ERROR_NONE;
}
static int bm_stop_recording_event()