summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/librte_eal/common/eal_common_dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index a08dc08..fd7f5ca 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -166,12 +166,16 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
ret = -ENODEV;
goto err_devarg;
}
+ /* Since there is a matching device, it is now its responsibility
+ * to manage the devargs we've just inserted. From this point
+ * those devargs shouldn't be removed manually anymore.
+ */
ret = dev->bus->plug(dev);
if (ret && !rte_dev_is_probed(dev)) { /* if hasn't ever succeeded */
RTE_LOG(ERR, EAL, "Driver cannot attach the device (%s)\n",
dev->name);
- goto err_devarg;
+ return ret;
}
*new_dev = dev;