]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dynamic debug: line queries failing due to uninitialized local variable
authorjbaron@akamai.com <jbaron@akamai.com>
Tue, 27 Aug 2013 16:50:03 +0000 (16:50 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Aug 2013 19:10:53 +0000 (12:10 -0700)
Settings of the form, 'line x module y +p', can fail arbitrarily due to an
uninitialized local variable. With this patch results are consistent, as
expected.

Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/dynamic_debug.c

index 99fec3ae405aa2e785c66605044d715633b894ac..c37aeacd7651b0ace2db9ffd85bad2ec45171d76 100644 (file)
@@ -309,7 +309,7 @@ static int ddebug_parse_query(char *words[], int nwords,
                        struct ddebug_query *query, const char *modname)
 {
        unsigned int i;
-       int rc;
+       int rc = 0;
 
        /* check we have an even number of words */
        if (nwords % 2 != 0) {