diff --git a/kernel/cpu.c b/kernel/cpu.c index 7f1edbdf336c..1a7ad6644cc5 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1195,10 +1195,8 @@ static int switch_to_rt_policy(void) if (policy == SCHED_NORMAL) /* Switch to SCHED_FIFO from SCHED_NORMAL. */ return sched_setscheduler_nocheck(current, SCHED_FIFO, ¶m); - else if (policy == SCHED_FIFO || policy == SCHED_RR) - return 1; else - return -EPERM; + return 1; } static int switch_to_fair_policy(void) @@ -1293,8 +1291,6 @@ static int cpu_up(unsigned int cpu, enum cpuhp_state target) */ switch_err = switch_to_rt_policy(); - if (switch_err < 0) - return switch_err; err = try_online_node(cpu_to_node(cpu)); if (err)