diff mbox series

[07/12] eal/pci: Reverse if check in rte_pci_get_iommu_class

Message ID 20190530174819.1160221-8-benjamin.walker@intel.com (mailing list archive)
State Superseded, archived
Headers show
Series [01/12] eal: Make rte_eal_using_phys_addrs work sooner | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Ben Walker May 30, 2019, 5:48 p.m. UTC
It's simpler to reverse the if statement here, especially
with an upcoming simplification.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I6cff80231032304f3f865fdf38157554fad7fd07
---
 drivers/bus/pci/linux/pci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index ebe62f140..f678d2318 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -601,10 +601,8 @@  rte_pci_get_iommu_class(void)
 		if (pci_ignore_device(dev))
 			continue;
 
-		if (dev->kdrv == RTE_KDRV_UNKNOWN ||
-		    dev->kdrv == RTE_KDRV_NONE) {
-			continue;
-		} else {
+		if (dev->kdrv != RTE_KDRV_UNKNOWN &&
+		    dev->kdrv != RTE_KDRV_NONE) {
 			is_bound = true;
 			break;
 		}