Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea46c8f7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarJason Baron <jbaron@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0fa05599
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;