From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH 07/10] bus/fslmc: fix the failure loop condition Date: Thu, 22 Jun 2017 19:27:14 +0530 Message-ID: <1498139837-19303-8-git-send-email-hemant.agrawal@nxp.com> References: <1498139837-19303-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , To: Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0063.outbound.protection.outlook.com [104.47.42.63]) by dpdk.org (Postfix) with ESMTP id C525A7CBC for ; Thu, 22 Jun 2017 15:57:27 +0200 (CEST) In-Reply-To: <1498139837-19303-1-git-send-email-hemant.agrawal@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 3213237..4c4e918 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -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; -- 2.7.4