summaryrefslogtreecommitdiff
path: root/drivers/bus/fslmc
diff options
context:
space:
mode:
authorGaetan Rivet <gaetan.rivet@6wind.com>2018-03-22 11:28:44 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-04-05 00:45:21 +0200
commit78f5a2e93d746110d1da1a81a62cf6149c52e6ef (patch)
tree6cf2176eaa233a98733e6751c4068e2025baaa9f /drivers/bus/fslmc
parent952b20777255d203dafd813b1adfb4b9d6b449d1 (diff)
downloaddpdk-78f5a2e93d746110d1da1a81a62cf6149c52e6ef.zip
dpdk-78f5a2e93d746110d1da1a81a62cf6149c52e6ef.tar.gz
dpdk-78f5a2e93d746110d1da1a81a62cf6149c52e6ef.tar.xz
bus/fslmc: fix find device start condition
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>
Diffstat (limited to 'drivers/bus/fslmc')
-rw-r--r--drivers/bus/fslmc/fslmc_bus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 4d29b53..d6806df 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -321,8 +321,9 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
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;
}