RTE_TAILQ_FOREACH_SAFE(dev, &rte_fslmc_bus.device_list, next, t_dev) {
TAILQ_REMOVE(&rte_fslmc_bus.device_list, dev, next);
+ rte_intr_instance_free(dev->intr_handle);
free(dev);
dev = NULL;
}
dev->device.bus = &rte_fslmc_bus.bus;
+ /* Allocate interrupt instance */
+ dev->intr_handle =
+ rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
+ if (dev->intr_handle == NULL) {
+ DPAA2_BUS_ERR("Failed to allocate intr handle");
+ ret = -ENOMEM;
+ goto cleanup;
+ }
+
/* Parse the device name and ID */
t_ptr = strtok(dup_dev_name, ".");
if (!t_ptr) {
cleanup:
if (dup_dev_name)
free(dup_dev_name);
- if (dev)
+ if (dev) {
+ rte_intr_instance_free(dev->intr_handle);
free(dev);
+ }
return ret;
}