bus/pci: fix find device implementation
authorGaetan Rivet <gaetan.rivet@6wind.com>
Fri, 27 Apr 2018 14:13:05 +0000 (16:13 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 27 Apr 2018 14:31:44 +0000 (16:31 +0200)
commit64de7e4069b9b84b0f2d840b44e334233412d55f
tree7aaa77c597aa7da8d49a46092c8b97fe253d6590
parent996096e629c3b6d08eab4acf51122ff783350b39
bus/pci: fix find device implementation

If start is set, and a device before it matches the data
passed for comparison, then this first device is returned.

This induces potentially infinite loops.

Fixes: c7fe1eea8a74 ("bus: simplify finding starting point")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/bus/pci/pci_common.c
drivers/bus/pci/rte_bus_pci.h