Unverified Commit 0c455f3a authored by Lucas De Marchi's avatar Lucas De Marchi Committed by Rodrigo Vivi
Browse files

drm/xe: Fix error handling in xe_irq_install()



When devm_add_action_or_reset() fails, it already calls the function
passed as parameter and that function is already free'ing the irqs.
Drop the goto and just return.

The caller, xe_device_probe(), should also do the same thing instead of
wrongly doing `goto err` and calling the unrelated xe_display_fini()
function.

Fixes: 14d25d8d ("drm/xe: change old msi irq api to a new one")
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250213192909.996148-3-lucas.demarchi@intel.com


Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 121b214c)
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 0ad2507d
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -757,19 +757,7 @@ int xe_irq_install(struct xe_device *xe)

	xe_irq_postinstall(xe);

	err = devm_add_action_or_reset(xe->drm.dev, irq_uninstall, xe);
	if (err)
		goto free_irq_handler;

	return 0;

free_irq_handler:
	if (xe_device_has_msix(xe))
		xe_irq_msix_free(xe);
	else
		xe_irq_msi_free(xe);

	return err;
	return devm_add_action_or_reset(xe->drm.dev, irq_uninstall, xe);
}

static void xe_irq_msi_synchronize_irq(struct xe_device *xe)