ems: frt: Add exception condition for frt init
authorYoungtae Lee <yt0729.lee@samsung.com>
Thu, 13 Sep 2018 10:00:36 +0000 (19:00 +0900)
committerhskang <hs1218.kang@samsung.com>
Wed, 10 Oct 2018 12:59:57 +0000 (21:59 +0900)
Change-Id: Ic69f786a4098e518fc043cc335339b6ef4822ba9
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
kernel/sched/rt.c

index 4100b37204f36119de7784bb080d7a92792ddda4..113fdf4da3615b356d2cf189b1839dc11586d93e 100644 (file)
@@ -15,7 +15,6 @@
 
 #ifdef CONFIG_SCHED_USE_FLUID_RT
 struct frt_dom {
-       bool                    enabled;
        unsigned int            coverage_ratio;
        unsigned int            coverage_thr;
        unsigned int            active_ratio;
@@ -278,10 +277,12 @@ static void frt_parse_dt(struct device_node *dn, struct frt_dom *dom, int cnt)
        if (!dom->active_ratio)
                dom->active_thr = 0;
 
-       dom->enabled = true;
        return;
 
 disable:
+       dom->coregroup = cnt;
+       dom->coverage_ratio = 100;
+       dom->active_thr = 0;
        pr_err("FRT(%s): failed to parse frt node\n", __func__);
 }
 
@@ -298,6 +299,8 @@ static int __init init_frt(void)
 
        INIT_LIST_HEAD(&frt_list);
        ptr_mask = kzalloc(sizeof(struct cpumask), GFP_KERNEL);
+       if (!ptr_mask)
+               pr_err("FRT(%s): failed to allocate ptr_mask\n");
        cpumask_setall(ptr_mask);
 
        for_each_possible_cpu(cpu) {
@@ -305,6 +308,8 @@ static int __init init_frt(void)
                        continue;
 
                dom = kzalloc(sizeof(struct frt_dom), GFP_KERNEL);
+               if (!dom)
+                       pr_err("FRT(%s): failed to allocate dom\n");
                if (cpu == 0)
                        head = dom;
 
@@ -327,7 +332,6 @@ static int __init init_frt(void)
 
                list_add_tail(&dom->list, &frt_list);
        }
-
        frt_sysfs_init();
 
        of_node_put(dn);