Skip to content

Commit df4d7ae

Browse files
lucasdemarchigregkh
authored andcommitted
drm/xe: Fix error handling in xe_irq_install()
[ Upstream commit 0c455f3 ] 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]> (cherry picked from commit 121b214) Signed-off-by: Rodrigo Vivi <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent c289b69 commit df4d7ae

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
@@ -757,19 +757,7 @@ int xe_irq_install(struct xe_device *xe)
757757

758758
xe_irq_postinstall(xe);
759759

760-
err = devm_add_action_or_reset(xe->drm.dev, irq_uninstall, xe);
761-
if (err)
762-
goto free_irq_handler;
763-
764-
return 0;
765-
766-
free_irq_handler:
767-
if (xe_device_has_msix(xe))
768-
xe_irq_msix_free(xe);
769-
else
770-
xe_irq_msi_free(xe);
771-
772-
return err;
760+
return devm_add_action_or_reset(xe->drm.dev, irq_uninstall, xe);
773761
}
774762

775763
static void xe_irq_msi_synchronize_irq(struct xe_device *xe)

0 commit comments

Comments
 (0)