]> git.droids-corp.org - dpdk.git/blobdiff - drivers/bus/fslmc/fslmc_bus.c
bus/fslmc: fix iterating on a class type
[dpdk.git] / drivers / bus / fslmc / fslmc_bus.c
index afbd82e8dbfb7dab6cb21d8e5916bc86553f0402..ac46eb4fe8c513688ed06c84cd192b1eb8c2a9e3 100644 (file)
@@ -603,6 +603,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
        struct rte_dpaa2_device *dev;
        char *dup, *dev_name = NULL;
 
+       if (str == NULL) {
+               DPAA2_BUS_DEBUG("No device string");
+               return NULL;
+       }
+
        /* Expectation is that device would be name=device_name */
        if (strncmp(str, "name=", 5) != 0) {
                DPAA2_BUS_DEBUG("Invalid device string (%s)\n", str);