[dpdk-dev] [PATCH v3 2/3] bond: fix pci_id_table allocation check in rte_eth_bond_create

Declan Doherty declan.doherty at intel.com
Wed Dec 17 12:46:58 CET 2014


Signed-off-by: Declan Doherty <declan.doherty at intel.com>
---
 lib/librte_pmd_bond/rte_eth_bond_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pmd_bond/rte_eth_bond_api.c b/lib/librte_pmd_bond/rte_eth_bond_api.c
index b124784..c2a99a3 100644
--- a/lib/librte_pmd_bond/rte_eth_bond_api.c
+++ b/lib/librte_pmd_bond/rte_eth_bond_api.c
@@ -214,7 +214,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 		goto err;
 	}
 	pci_id_table = rte_zmalloc_socket(name, sizeof(*pci_id_table), 0, socket_id);
-	if (pci_drv == NULL) {
+	if (pci_id_table == NULL) {
 		RTE_BOND_LOG(ERR, "Unable to malloc pci_id_table on socket");
 		goto err;
 	}
-- 
1.7.12.2



More information about the dev mailing list