From: Youngtae Lee Date: Thu, 13 Sep 2018 10:00:36 +0000 (+0900) Subject: ems: frt: Add exception condition for frt init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b0fa10d7fd5a2b5bed206e27e84789fd4410d8d9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ems: frt: Add exception condition for frt init Change-Id: Ic69f786a4098e518fc043cc335339b6ef4822ba9 Signed-off-by: Youngtae Lee --- diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 4100b37204f3..113fdf4da361 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -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);