diff options
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c22b40f8f576..8c358395d338 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -3896,17 +3896,9 @@ trace_options_core_write(struct file *filp, const char __user *ubuf, size_t cnt, | |||
3896 | if (ret < 0) | 3896 | if (ret < 0) |
3897 | return ret; | 3897 | return ret; |
3898 | 3898 | ||
3899 | switch (val) { | 3899 | if (val != 0 && val != 1) |
3900 | case 0: | ||
3901 | trace_flags &= ~(1 << index); | ||
3902 | break; | ||
3903 | case 1: | ||
3904 | trace_flags |= 1 << index; | ||
3905 | break; | ||
3906 | |||
3907 | default: | ||
3908 | return -EINVAL; | 3900 | return -EINVAL; |
3909 | } | 3901 | set_tracer_flags(1 << index, val); |
3910 | 3902 | ||
3911 | *ppos += cnt; | 3903 | *ppos += cnt; |
3912 | 3904 | ||