diff options
Diffstat (limited to '')
-rw-r--r-- | lib/dynamic_debug.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 6fba6423cc..a5a687e1c9 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -302,7 +302,11 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords) } else { for (end = buf; *end && !isspace(*end); end++) ; - BUG_ON(end == buf); + if (end == buf) { + pr_err("parse err after word:%d=%s\n", nwords, + nwords ? words[nwords - 1] : "<none>"); + return -EINVAL; + } } /* `buf' is start of word, `end' is one past its end */ |