sched/core: Use -EINVAL in sched_dynamic_mode()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 25 Mar 2021 00:45:15 +0000 (01:45 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 25 Mar 2021 10:39:13 +0000 (11:39 +0100)
-1 is -EPERM which is a somewhat odd error to return from
sched_dynamic_write(). No other callers care about which negative
value is used.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: https://lore.kernel.org/r/20210325004515.531631-2-linux@rasmusvillemoes.dk
kernel/sched/core.c

index 1fe9d3f..95bd6ab 100644 (file)
@@ -5384,7 +5384,7 @@ static int sched_dynamic_mode(const char *str)
        if (!strcmp(str, "full"))
                return preempt_dynamic_full;
 
-       return -1;
+       return -EINVAL;
 }
 
 static void sched_dynamic_update(int mode)