]> git.droids-corp.org - dpdk.git/commitdiff
bus/fslmc: fix the failure loop condition
authorHemant Agrawal <hemant.agrawal@nxp.com>
Thu, 22 Jun 2017 13:57:14 +0000 (19:27 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jul 2017 13:00:56 +0000 (15:00 +0200)
Correct the while condition for cleanup in case of failure.

Fixes: a0d5c9caf0f1 ("bus/fslmc: add frame queue based dq storage")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c

index 3213237733555289b9d4903099bc4db1b67b3828..4c4e9186749fbfc2c46654e69e60cfd27c711b6c 100644 (file)
@@ -437,8 +437,7 @@ dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage)
        }
        return 0;
 fail:
-       i -= 1;
-       while (i >= 0)
+       while (--i >= 0)
                rte_free(q_storage->dq_storage[i]);
 
        return -1;