[v5,1/8] bus/dpaa: fix bus scan for DMA devices

Message ID 20240710085534.2564668-2-vanshika.shukla@nxp.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Headers
Series DPAA specific fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

vanshika.shukla@nxp.com July 10, 2024, 8:55 a.m. UTC
  From: Gagandeep Singh <g.singh@nxp.com>

if there is no sec devices available, code is not scanning QDMA dev
This patch fix this problem by adding a goto statement instead
of return in case no sec device available.

Fixes: 583f3732974f ("dma/dpaa: introduce DPAA DMA driver skeleton")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 64b748626b..b8f41ec069 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -221,7 +221,7 @@  dpaa_create_device_list(void)
 
 	if (dpaa_sec_available()) {
 		DPAA_BUS_LOG(INFO, "DPAA SEC devices are not available");
-		return 0;
+		goto qdma_dpaa;
 	}
 
 	/* Creating SEC Devices */
@@ -260,6 +260,7 @@  dpaa_create_device_list(void)
 
 	rte_dpaa_bus.device_count += i;
 
+qdma_dpaa:
 	/* Creating QDMA Device */
 	for (i = 0; i < RTE_DPAA_QDMA_DEVICES; i++) {
 		dev = calloc(1, sizeof(struct rte_dpaa_device));