pass: Initialize the policy->governor instance
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 6 Dec 2016 05:37:46 +0000 (14:37 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 16 Jan 2017 11:35:37 +0000 (20:35 +0900)
This patch initializes the policy->governor instance to prevenet
the starting issue because policy->governor might have the garbage data.
It cause that pass could not start.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass.c

index c5e7557a876f6d095f267bb900f0fd46bee8c77c..ae056ece5c214a7ad1d815924780e0fe5515bd8d 100644 (file)
@@ -259,6 +259,7 @@ static void pass_init(void *data2)
        for (i = 0; i < cluster.num_cpu_clusters; i++) {
                policy_list[i].cluster.id = cluster.cpu[i].id;
                policy_list[i].cluster.cpu = cluster.cpu[i].cpu;
+               policy_list[i].governor = NULL;
                strcpy(policy_list[i].cluster.path_conf_file, cluster.cpu[i].path_conf_file);
                strcpy(policy_list[i].cluster.path_load_table, cluster.cpu[i].path_load_table);