Change-Id: I5388e108da0850600c547ecf7d77d969bff528aa
Signed-off-by: Randeep Singh <randeep.s@samsung.com>
_ERR("error reported, error = %d", error);
return BATTERY_MONITOR_ERROR_INTERNAL;
}
+ if (resource_usage->ResourceId == NULL) {
+ _ERR("Battery Usage for ResourceId not found");
+ bm_resourceid_usage_free(resource_usage);
+ return BATTERY_MONITOR_ERROR_RECORD_NOT_FOUND;
+ }
+
*battery_usage = bm_calc_individual_mah_consumption(resource_usage->usage, cmah);
bm_resourceid_usage_free(resource_usage);