Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Commit

Permalink
dynamic_debug: small cleanup in ddebug_proc_write()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Jason Baron <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
error27 authored and torvalds committed May 25, 2010
1 parent 0fa0559 commit ea46c8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dynamic_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
__func__, (int)len);

nwords = ddebug_tokenize(tmpbuf, words, MAXWORDS);
if (nwords < 0)
if (nwords <= 0)
return -EINVAL;
if (ddebug_parse_query(words, nwords-1, &query))
return -EINVAL;
Expand Down

0 comments on commit ea46c8f

Please sign in to comment.