]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_pipeline/rte_swx_pipeline.c
pipeline: adjust error code for internal function
[dpdk.git] / lib / librte_pipeline / rte_swx_pipeline.c
index 52987870de06c7c2091f076ead10e8b748aae1e6..2956dde77fc5c65f90b50c4d55a3ef4c20706387 100644 (file)
@@ -8059,20 +8059,20 @@ instruction_config(struct rte_swx_pipeline *p,
        /* Memory allocation. */
        instr = calloc(n_instructions, sizeof(struct instruction));
        if (!instr) {
-               err = ENOMEM;
+               err = -ENOMEM;
                goto error;
        }
 
        data = calloc(n_instructions, sizeof(struct instruction_data));
        if (!data) {
-               err = ENOMEM;
+               err = -ENOMEM;
                goto error;
        }
 
        for (i = 0; i < n_instructions; i++) {
                char *string = strdup(instructions[i]);
                if (!string) {
-                       err = ENOMEM;
+                       err = -ENOMEM;
                        goto error;
                }