[dpdk-dev] [PATCH 3/3] bus/fslmc: fix incorrect string compare length

Shreyansh Jain shreyansh.jain at nxp.com
Tue Jan 30 16:06:21 CET 2018


Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")
Cc: shreyansh.jain at nxp.com

Incorrect string length was being compared while scanning DPCI object.

Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index e9acd3588..5ee0beb85 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -141,7 +141,7 @@ scan_one_fslmc_device(char *dev_name)
 		dev->dev_type = DPAA2_BPOOL;
 	else if (!strncmp("dpio", t_ptr, 4))
 		dev->dev_type = DPAA2_IO;
-	else if (!strncmp("dpci", t_ptr, 5))
+	else if (!strncmp("dpci", t_ptr, 4))
 		dev->dev_type = DPAA2_CI;
 	else if (!strncmp("dpmcp", t_ptr, 5))
 		dev->dev_type = DPAA2_MPORTAL;
-- 
2.14.1



More information about the dev mailing list