History

dynamic_debug: small cleanup in ddebug_proc_write()

This doesn't change behavior at all. In the original code, if nwords was zero then ddebug_parse_query() would return -EINVAL, now we just do it earlier.

Dan Carpenter committed 16 years ago

Commit ea46c8f1 parent 0fa05591 file · +1 −1Browse files

Showing the changes to lib/dynamic_debug.c (1 of 1 file). Show all

Unified · Split

lib/dynamic_debug.c+1−1
@@ -456,7 +456,7 @@ static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf, · 455 unmodified lines
456456 __func__, (int)len);
457457
458458 nwords = ddebug_tokenize(tmpbuf, words, MAXWORDS);
459− if (nwords < 0)
459+ if (nwords <= 0)
460460 return -EINVAL;
461461 if (ddebug_parse_query(words, nwords-1, &query))
462462 return -EINVAL;