Skip to content

Commit 121b214

Browse files
committed
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: 14d25d8 ("drm/xe: change old msi irq api to a new one") Reviewed-by: Rodrigo Vivi <[email protected]> Reviewed-by: Himal Prasad Ghimiray <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 8b3f09f commit 121b214

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/gpu/drm/xe/xe_irq.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -775,19 +775,7 @@ int xe_irq_install(struct xe_device *xe)
775775

776776
xe_irq_postinstall(xe);
777777

778-
err = devm_add_action_or_reset(xe->drm.dev, irq_uninstall, xe);
779-
if (err)
780-
goto free_irq_handler;
781-
782-
return 0;
783-
784-
free_irq_handler:
785-
if (xe_device_has_msix(xe))
786-
xe_irq_msix_free(xe);
787-
else
788-
xe_irq_msi_free(xe);
789-
790-
return err;
778+
return devm_add_action_or_reset(xe->drm.dev, irq_uninstall, xe);
791779
}
792780

793781
static void xe_irq_msi_synchronize_irq(struct xe_device *xe)

0 commit comments

Comments
 (0)