[PATCH 4/7] WIP - clean up the failpath in i915_driver_probe() part 1

Luca Coelho luciano.coelho at intel.com
Mon Sep 30 09:29:39 UTC 2024


Signed-off-by: Luca Coelho <luciano.coelho at intel.com>
---
 drivers/gpu/drm/i915/i915_driver.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index bf245819bfff..5d40454e2e44 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -829,7 +829,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	ret = intel_irq_install(i915);
 	if (ret)
-		goto out_cleanup_modeset;
+		goto out_cleanup_probe_noirq;
 
 	ret = intel_display_driver_probe_nogem(i915);
 	if (ret)
@@ -837,7 +837,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	ret = i915_gem_init(i915);
 	if (ret)
-		goto out_cleanup_modeset2;
+		goto out_cleanup_probe_nogem;
 
 	ret = intel_pxp_init(i915);
 	if (ret && ret != -ENODEV)
@@ -867,21 +867,24 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	i915_gem_driver_remove(i915);
 	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	i915_gem_driver_release(i915);
-out_cleanup_modeset2:
+/* out_cleanup_modeset2: */
 	/* FIXME clean up the error path */
 	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	intel_display_driver_remove(i915);
 	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	intel_irq_uninstall(i915);
+
+out_cleanup_probe_nogem:
 	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
-	intel_display_driver_remove_noirq(i915);
-	goto out_cleanup_modeset;
+	intel_display_driver_remove_nogem(i915);
+
 out_cleanup_irq:
 	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	intel_irq_uninstall(i915);
-out_cleanup_modeset:
+out_cleanup_probe_noirq:
 	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
-	intel_display_driver_remove_nogem(i915);
+	intel_display_driver_remove_noirq(i915);
+
 out_cleanup_hw:
 	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	i915_driver_hw_remove(i915);
-- 
2.45.2



More information about the Intel-gfx-trybot mailing list