diff options
-rw-r--r-- | kernel/trace/trace_ksym.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c index 955600929907..72fcb46c39c0 100644 --- a/kernel/trace/trace_ksym.c +++ b/kernel/trace/trace_ksym.c | |||
@@ -158,21 +158,21 @@ static int ksym_trace_get_access_type(char *str) | |||
158 | static int parse_ksym_trace_str(char *input_string, char **ksymname, | 158 | static int parse_ksym_trace_str(char *input_string, char **ksymname, |
159 | unsigned long *addr) | 159 | unsigned long *addr) |
160 | { | 160 | { |
161 | char *delimiter = ":"; | ||
162 | int ret; | 161 | int ret; |
163 | 162 | ||
164 | ret = -EINVAL; | 163 | strstrip(input_string); |
165 | *ksymname = strsep(&input_string, delimiter); | 164 | |
165 | *ksymname = strsep(&input_string, ":"); | ||
166 | *addr = kallsyms_lookup_name(*ksymname); | 166 | *addr = kallsyms_lookup_name(*ksymname); |
167 | 167 | ||
168 | /* Check for malformed request: (2), (1) and (5) */ | 168 | /* Check for malformed request: (2), (1) and (5) */ |
169 | if ((!input_string) || | 169 | if ((!input_string) || |
170 | (strlen(input_string) != (KSYM_TRACER_OP_LEN + 1)) || | 170 | (strlen(input_string) != KSYM_TRACER_OP_LEN) || |
171 | (*addr == 0)) | 171 | (*addr == 0)) |
172 | goto return_code; | 172 | return -EINVAL;; |
173 | |||
173 | ret = ksym_trace_get_access_type(input_string); | 174 | ret = ksym_trace_get_access_type(input_string); |
174 | 175 | ||
175 | return_code: | ||
176 | return ret; | 176 | return ret; |
177 | } | 177 | } |
178 | 178 | ||