net/virtio: handle virtio-user setup failure properly
[dpdk.git] / drivers / net / pcap / rte_eth_pcap.c
index 4930d7d..ff02ade 100644 (file)
@@ -19,8 +19,8 @@
 #include <pcap.h>
 
 #include <rte_cycles.h>
-#include <rte_ethdev_driver.h>
-#include <rte_ethdev_vdev.h>
+#include <ethdev_driver.h>
+#include <ethdev_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
@@ -1324,9 +1324,8 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
 
                /* phy_mac arg is applied only only if "iface" devarg is provided */
                if (rx_queues->phy_mac) {
-                       int ret = eth_pcap_update_mac(rx_queues->queue[0].name,
-                                       eth_dev, vdev->device.numa_node);
-                       if (ret == 0)
+                       if (eth_pcap_update_mac(rx_queues->queue[0].name,
+                                       eth_dev, vdev->device.numa_node) == 0)
                                internals->phy_mac = 1;
                }
        }