bus/pci: reference driver structure before mapping
[dpdk.git] / examples / ip_pipeline / cli.c
index 6aebae4..c9587f5 100644 (file)
@@ -653,6 +653,7 @@ cmd_kni(char **tokens,
        char *name;
        struct kni *kni;
 
+       memset(&p, 0, sizeof(p));
        if ((n_tokens != 6) && (n_tokens != 8)) {
                snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
                return;
@@ -1892,12 +1893,6 @@ cmd_pipeline_table(char **tokens,
 
                t0 += 6;
        } else if (strcmp(tokens[t0], "stub") == 0) {
-               if (n_tokens < t0 + 1) {
-                       snprintf(out, out_size, MSG_ARG_MISMATCH,
-                               "pipeline table stub");
-                       return;
-               }
-
                p.match_type = TABLE_STUB;
 
                t0 += 1;