Merge "Add else branch to avoide fclose(NULL)"

This commit is contained in:
Treehugger Robot 2016-11-22 16:20:21 +00:00 committed by Gerrit Code Review
commit 10b043bb13

View file

@ -138,8 +138,9 @@ static ssize_t get_cpu_usages(thermal_module_t *module, cpu_usage_t *list) {
fclose(file);
fclose(cpu_file);
return errno ? -errno : -EIO;
}
} else {
fclose(cpu_file);
}
if (list != NULL) {
list[size] = (cpu_usage_t) {