dev: fix attach proceeding with vdev on PCI success

When rte_eal_hotplug_add() successfully probes a PCI device,
the return value is zero.
The check afterward only returns on error different from -EINVAL.
It should return also on success, as there is no need to
attempt probing the device with vdev.

Fixes: 0bba9e6050 ("eal: use new hotplug API in attach")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
This commit is contained in:
Gaetan Rivet 2017-07-26 13:52:22 +02:00 committed by Thomas Monjalon
parent 8783252166
commit 1c35f666df

View File

@ -74,7 +74,7 @@ int rte_eal_dev_attach(const char *name, const char *devargs)
}
ret = rte_eal_hotplug_add("pci", name, devargs);
if (ret && ret != -EINVAL)
if (ret != -EINVAL)
return ret;
/*