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:
parent
8783252166
commit
1c35f666df
@ -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;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user