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

Luca Coelho luciano.coelho at intel.com
Thu Oct 3 08:01:17 UTC 2024


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

diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index eac9fae80344..1ffb3c318c18 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -795,7 +795,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)
@@ -803,7 +803,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)
@@ -827,15 +827,18 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	i915_gem_suspend(i915);
 	i915_gem_driver_remove(i915);
 	i915_gem_driver_release(i915);
-out_cleanup_modeset2:
+/* out_cleanup_modeset2: */
 	/* FIXME clean up the error path */
 	intel_display_driver_remove(i915);
 	intel_irq_uninstall(i915);
+	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	intel_display_driver_remove_noirq(i915);
 	goto out_cleanup_modeset;
 out_cleanup_irq:
+	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	intel_irq_uninstall(i915);
 out_cleanup_modeset:
+	drm_info(&i915->drm, "LUCA: i915_driver_probe cleanup line %d\n", __LINE__);
 	intel_display_driver_remove_nogem(i915);
 out_cleanup_hw:
 	i915_driver_hw_remove(i915);
-- 
2.45.2



More information about the Intel-gfx-trybot mailing list