bus/fslmc: fix DPCI compare in scan
authorShreyansh Jain <shreyansh.jain@nxp.com>
Tue, 30 Jan 2018 15:06:21 +0000 (20:36 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 31 Jan 2018 00:36:50 +0000 (01:36 +0100)
Incorrect string length was being compared while scanning DPCI object.

Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
drivers/bus/fslmc/fslmc_bus.c

index e9acd35..5ee0beb 100644 (file)
@@ -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;