- rte_eth_dev_info_get(port, &dev_info);
- bp = (struct bnxt *)eth_dev->data->dev_private;
+ rc = rte_eth_dev_info_get(port, &dev_info);
+ if (rc != 0) {
+ PMD_DRV_LOG(ERR,
+ "Error during getting device (port %u) info: %s\n",
+ port, strerror(-rc));
+
+ return rc;
+ }
+ bp = eth_dev->data->dev_private;