net/bonding: fix error code on device creation
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Tue, 14 Jul 2020 08:19:43 +0000 (16:19 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jul 2020 16:21:21 +0000 (18:21 +0200)
commit2dd4f08540cc32cc1a62579d66d055327638ac92
treef664f3867de7a1f58fcf5fe8903bd51cc53563ca
parentd1d5d3e4b3162a3be50f0dd47071d5175c8a715f
net/bonding: fix error code on device creation

Because the return value of rte_vdev_init() has multiple non-zero
values, when rte_vdev_init() return non-zero in the
rte_eth_bond_create() function, it should return the actual error code
rather than -ENOMEM.

Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")
Cc: stable@dpdk.org
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/bonding/rte_eth_bond_api.c