Commit 604f7e77 authored by Michał Winiarski's avatar Michał Winiarski Committed by Rodrigo Vivi

drm/xe/irq: Don't call pci_free_irq_vectors

For devres managed devices, pci_alloc_irq_vectors is also managed (see
pci_setup_msi_context for reference).
PCI device used by Xe is devres managed (it was enabled with
pcim_enable_device), which means that calls to pci_free_irq_vectors are
redundant and can be safely removed.
Signed-off-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20231129214509.1174116-4-michal.winiarski@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent f321ef04
...@@ -585,7 +585,6 @@ static void irq_uninstall(struct drm_device *drm, void *arg) ...@@ -585,7 +585,6 @@ static void irq_uninstall(struct drm_device *drm, void *arg)
irq = pci_irq_vector(pdev, 0); irq = pci_irq_vector(pdev, 0);
free_irq(irq, xe); free_irq(irq, xe);
pci_free_irq_vectors(pdev);
} }
int xe_irq_install(struct xe_device *xe) int xe_irq_install(struct xe_device *xe)
...@@ -612,7 +611,7 @@ int xe_irq_install(struct xe_device *xe) ...@@ -612,7 +611,7 @@ int xe_irq_install(struct xe_device *xe)
err = request_irq(irq, irq_handler, IRQF_SHARED, DRIVER_NAME, xe); err = request_irq(irq, irq_handler, IRQF_SHARED, DRIVER_NAME, xe);
if (err < 0) { if (err < 0) {
drm_err(&xe->drm, "Failed to request MSI/MSIX IRQ %d\n", err); drm_err(&xe->drm, "Failed to request MSI/MSIX IRQ %d\n", err);
goto free_pci_irq_vectors; return err;
} }
xe->irq.enabled = true; xe->irq.enabled = true;
...@@ -627,8 +626,6 @@ int xe_irq_install(struct xe_device *xe) ...@@ -627,8 +626,6 @@ int xe_irq_install(struct xe_device *xe)
free_irq_handler: free_irq_handler:
free_irq(irq, xe); free_irq(irq, xe);
free_pci_irq_vectors:
pci_free_irq_vectors(pdev);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment