summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2016-01-19 15:26:27 +0200
committerImre Deak <imre.deak@intel.com>2016-01-27 17:43:14 +0200
commit02036cee8373712d154a7cac76e1325f93fce9e5 (patch)
tree2ec2976397f9e363bd0afb9c2da1eacfe9c374f3 /drivers/gpu/drm/i915/i915_dma.c
parent89250fec1c2b7846cd994e91d8dd7398e67ae129 (diff)
downloadop-kernel-dev-02036cee8373712d154a7cac76e1325f93fce9e5.zip
op-kernel-dev-02036cee8373712d154a7cac76e1325f93fce9e5.tar.gz
drm/i915: Sanitize i915_get_bridge_dev() error path
Clarify the name of the label on the error path, making it clear what's being cleaned up. The kmem_cache_destroy() calls are NOPs on the corresponding error path. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: David Weinehall <david.weinehall@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1453209992-25995-3-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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 4b2c073..5caea9e 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -916,7 +916,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (i915_get_bridge_dev(dev)) {
ret = -EIO;
- goto free_priv;
+ goto out_runtime_pm_put;
}
mmio_bar = IS_GEN2(dev) ? 1 : 0;
@@ -1121,11 +1121,10 @@ out_uncore_fini:
pci_iounmap(dev->pdev, dev_priv->regs);
put_bridge:
pci_dev_put(dev_priv->bridge_dev);
-free_priv:
kmem_cache_destroy(dev_priv->requests);
kmem_cache_destroy(dev_priv->vmas);
kmem_cache_destroy(dev_priv->objects);
-
+out_runtime_pm_put:
intel_runtime_pm_put(dev_priv);
kfree(dev_priv);
OpenPOWER on IntegriCloud