cfgfile: fix leak on creation error
[dpdk.git] / drivers / net / sfc / sfc_ethdev.c
index bd09191..2f5f86f 100644 (file)
@@ -33,6 +33,7 @@
 #include <rte_ethdev.h>
 #include <rte_ethdev_pci.h>
 #include <rte_pci.h>
+#include <rte_bus_pci.h>
 #include <rte_errno.h>
 
 #include "efx.h"
@@ -1791,8 +1792,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
        /* Copy PCI device info to the dev->data */
        rte_eth_copy_pci_info(dev, pci_dev);
 
-       dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE;
-
        rc = sfc_kvargs_parse(sa);
        if (rc != 0)
                goto fail_kvargs_parse;