Don't need separate flag value.

Signed-off-by: Stephen Hemminger <sthem...@microsoft.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 1e3bbeeb0a66..88b969c073a0 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -111,12 +111,10 @@ rte_fslmc_find_device(const struct rte_device *start, 
rte_dev_cmp_t cmp,
                      const void *data)
 {
        struct rte_dpaa2_device *dev;
-       bool start_found = !start;
 
        TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) {
-               if (!start_found) {
-                       if (&dev->device == start)
-                               start_found = 1;
+               if (start && &dev->device == start)
+                       start = NULL;  /* starting point found */
                        continue;
                }
 
-- 
2.11.0

Reply via email to