diff options
author | Imre Deak <imre.deak@intel.com> | 2016-03-16 13:39:07 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2016-03-17 15:22:08 +0200 |
commit | 65ff442f6bca0e2247ff7acac6014bcea69d1f7e (patch) | |
tree | b477686a06885de48a0d0ca11fbca17b7cd685c3 /drivers/gpu/drm/i915/i915_dma.c | |
parent | 432f856d8b4963f2f1d95844794266d7c9a9ca97 (diff) | |
download | lwn-65ff442f6bca0e2247ff7acac6014bcea69d1f7e.tar.gz lwn-65ff442f6bca0e2247ff7acac6014bcea69d1f7e.zip |
drm/i915: Fix power domain HW state cleanup on error path
Move the cleanup of the power domain HW state on the error path to the
same function where the corresponding init call was called from. I
noticed this problem when loading the module with load failure injection
enabled, making i915_load_modeset_init() fail.
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1458128348-15730-19-git-send-email-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index b8c5fd0a99aa..7466e739887d 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -453,6 +453,7 @@ cleanup_irq: intel_teardown_gmbus(dev); cleanup_csr: intel_csr_ucode_fini(dev_priv); + intel_power_domains_fini(dev_priv); vga_switcheroo_unregister_client(dev->pdev); cleanup_vga_client: vga_client_register(dev->pdev, NULL, NULL, NULL); @@ -1306,7 +1307,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) ret = i915_load_modeset_init(dev); if (ret < 0) { DRM_ERROR("failed to init modeset\n"); - goto out_power_well; + goto out_cleanup_vblank; } i915_driver_register(dev_priv); @@ -1317,8 +1318,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) return 0; -out_power_well: - intel_power_domains_fini(dev_priv); +out_cleanup_vblank: drm_vblank_cleanup(dev); out_cleanup_hw: i915_driver_cleanup_hw(dev_priv); |