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=3c46d0624803f5e413658b1ddd302a869cf00ffd;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 583802e0e0a0..7eb5012f1171 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -16,7 +16,6 @@ #ifdef CONFIG_SCHED_USE_FLUID_RT struct frt_dom { - bool enabled; unsigned int coverage_ratio; unsigned int coverage_thr; unsigned int active_ratio; @@ -279,10 +278,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__); } @@ -299,6 +300,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) { @@ -306,6 +309,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; @@ -328,7 +333,6 @@ static int __init init_frt(void) list_add_tail(&dom->list, &frt_list); } - frt_sysfs_init(); of_node_put(dn);