summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-12-24 14:03:49 +0530
committerInki Dae <inki.dae@samsung.com>2013-01-04 15:54:35 +0900
commitcfdee8f421759c4cf173291977b71757ff4eae27 (patch)
treebafc937a8b8945b3c6ac424c3223745b6975b810 /drivers
parentaf8cd946136a1c1e9614ac9f9fc78e58654582ac (diff)
downloadlinux-cfdee8f421759c4cf173291977b71757ff4eae27.tar.bz2
drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_gsc.c
devm_* APIs are device managed and get freed automatically when the device detaches. Thus explicit freeing is not needed. This saves some code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gsc.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 509f2f83e5a5..9c6de7a5944b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1687,8 +1687,7 @@ static int __devinit gsc_probe(struct platform_device *pdev)
ctx->gsc_clk = clk_get(dev, "gscl");
if (IS_ERR(ctx->gsc_clk)) {
dev_err(dev, "failed to get gsc clock.\n");
- ret = PTR_ERR(ctx->gsc_clk);
- goto err_ctx;
+ return PTR_ERR(ctx->gsc_clk);
}
/* resource memory */
@@ -1711,7 +1710,7 @@ static int __devinit gsc_probe(struct platform_device *pdev)
if (!res) {
dev_err(dev, "failed to request irq resource.\n");
ret = -ENOENT;
- goto err_get_regs;
+ goto err_clk;
}
ctx->irq = res->start;
@@ -1719,7 +1718,7 @@ static int __devinit gsc_probe(struct platform_device *pdev)
IRQF_ONESHOT, "drm_gsc", ctx);
if (ret < 0) {
dev_err(dev, "failed to request irq.\n");
- goto err_get_regs;
+ goto err_clk;
}
/* context initailization */
@@ -1763,12 +1762,8 @@ err_ippdrv_register:
pm_runtime_disable(dev);
err_get_irq:
free_irq(ctx->irq, ctx);
-err_get_regs:
- devm_iounmap(dev, ctx->regs);
err_clk:
clk_put(ctx->gsc_clk);
-err_ctx:
- devm_kfree(dev, ctx);
return ret;
}
@@ -1786,12 +1781,8 @@ static int __devexit gsc_remove(struct platform_device *pdev)
pm_runtime_disable(dev);
free_irq(ctx->irq, ctx);
- devm_iounmap(dev, ctx->regs);
-
clk_put(ctx->gsc_clk);
- devm_kfree(dev, ctx);
-
return 0;
}