[PATCH] bus/fslmc: fix bus scan return failure value

Hemant Agrawal hemant.agrawal at nxp.com
Mon Nov 11 11:26:07 CET 2024


fslmc bus will not be available on non DPAA2 platform.
Do not return error on scan failure.

Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 17b3b6156c..68ad2b801e 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -243,8 +243,6 @@ rte_fslmc_parse(const char *name, void *addr)
 	uint8_t sep_exists = 0;
 	int ret = -1;
 
-	DPAA2_BUS_DEBUG("Parsing dev=(%s)", name);
-
 	/* There are multiple ways this can be called, with bus:dev, name=dev
 	 * or just dev. In all cases, the 'addr' is actually a string.
 	 */
@@ -329,7 +327,8 @@ rte_fslmc_scan(void)
 	group_name = getenv("DPRC");
 	if (!group_name) {
 		DPAA2_BUS_DEBUG("DPAA2: DPRC not available");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto scan_fail;
 	}
 
 	ret = fslmc_get_container_group(group_name, &groupid);
-- 
2.25.1



More information about the dev mailing list