If start is set and a device before it matches the data,
this device is returned.
Fixes:
c7fe1eea8a74 ("bus: simplify finding starting point")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
struct rte_dpaa2_device *dev;
TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) {
- if (start && &dev->device == start) {
- start = NULL; /* starting point found */
+ if (start != NULL) {
+ if (&dev->device == start)
+ start = NULL; /* starting point found */
continue;
}