aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-24 17:33:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 11:07:05 -0400
commitea46c8f774f295c45fac48101d54be347d3d453b (patch)
tree6a0bc2476e82be68b66cad2b77075e4f36beb1ea /lib
parent0fa05599009ed36304d490064888d0252d656add (diff)
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. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/dynamic_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index d6b8b9b1abfe..3df8eb17a607 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -456,7 +456,7 @@ static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
456 __func__, (int)len); 456 __func__, (int)len);
457 457
458 nwords = ddebug_tokenize(tmpbuf, words, MAXWORDS); 458 nwords = ddebug_tokenize(tmpbuf, words, MAXWORDS);
459 if (nwords < 0) 459 if (nwords <= 0)
460 return -EINVAL; 460 return -EINVAL;
461 if (ddebug_parse_query(words, nwords-1, &query)) 461 if (ddebug_parse_query(words, nwords-1, &query))
462 return -EINVAL; 462 return -EINVAL;