If json configuraiton file doesn't contain the 'number_of_cpus'
property, number_of_cpus has the minus value. It causes the problem.
So that fix uninitialized value of number_of_cpus property when value is
out of range.
Change-Id: Ibac93e89b3cd85181287773b0bf0cf7f4aa6f692
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
break;
}
+ number_of_cpus = number_of_cpus < 0 ? 0 : number_of_cpus;
+
/* Initialize config_data from property values of confiugartion file */
if (!strncmp(device_type, PASS_RESOURCE_CPU_NAME, strlen(device_type)))
config_data->res_type = PASS_RESOURCE_CPU_ID;