]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/hinic/hinic_pmd_ethdev.c
net/hinic: fail initialization for not supported device
[dpdk.git] / drivers / net / hinic / hinic_pmd_ethdev.c
index e8264feb15783abb1ffc689259452b4085c3a4e1..073afa4fa992c40e7ccc1eb1d7307986e279f6d6 100644 (file)
@@ -2812,8 +2812,12 @@ static int hinic_nic_dev_create(struct rte_eth_dev *eth_dev)
        }
 
        /* get nic capability */
-       if (!hinic_support_nic(nic_dev->hwdev, &nic_dev->nic_cap))
+       if (!hinic_support_nic(nic_dev->hwdev, &nic_dev->nic_cap)) {
+               PMD_DRV_LOG(ERR, "Hw doesn't support nic, dev_name: %s",
+                           eth_dev->data->name);
+               rc = -EINVAL;
                goto nic_check_fail;
+       }
 
        /* init root cla and function table */
        rc = hinic_init_nicio(nic_dev->hwdev);