dev: fix attach proceeding with vdev on PCI success
authorGaetan Rivet <gaetan.rivet@6wind.com>
Wed, 26 Jul 2017 11:52:22 +0000 (13:52 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 31 Jul 2017 07:56:25 +0000 (09:56 +0200)
commit1c35f666df0786541cd2c83fbad332c1af2a78e7
tree00da0b40dfdaebc4c6da16ef67c9ffaba6f5dd39
parent8783252166dac9cf9a829f8e697ebb3cfba4e874
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: 0bba9e605048 ("eal: use new hotplug API in attach")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
lib/librte_eal/common/eal_common_dev.c