bus/fslmc: fix the failure loop condition

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>
This commit is contained in:
Hemant Agrawal 2017-06-22 19:27:14 +05:30 committed by Ferruh Yigit
parent a032b8e3d8
commit e401e2c95a

View 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;