Commit 6eac74d1 authored by Sachin Kamat's avatar Sachin Kamat Committed by Inki Dae

drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 15b3263e
...@@ -658,29 +658,26 @@ static int __devinit rotator_probe(struct platform_device *pdev) ...@@ -658,29 +658,26 @@ static int __devinit rotator_probe(struct platform_device *pdev)
rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!rot->regs_res) { if (!rot->regs_res) {
dev_err(dev, "failed to find registers\n"); dev_err(dev, "failed to find registers\n");
ret = -ENOENT; return -ENOENT;
goto err_get_resource;
} }
rot->regs = devm_request_and_ioremap(dev, rot->regs_res); rot->regs = devm_request_and_ioremap(dev, rot->regs_res);
if (!rot->regs) { if (!rot->regs) {
dev_err(dev, "failed to map register\n"); dev_err(dev, "failed to map register\n");
ret = -ENXIO; return -ENXIO;
goto err_get_resource;
} }
rot->irq = platform_get_irq(pdev, 0); rot->irq = platform_get_irq(pdev, 0);
if (rot->irq < 0) { if (rot->irq < 0) {
dev_err(dev, "failed to get irq\n"); dev_err(dev, "failed to get irq\n");
ret = rot->irq; return rot->irq;
goto err_get_irq;
} }
ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler,
IRQF_ONESHOT, "drm_rotator", rot); IRQF_ONESHOT, "drm_rotator", rot);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "failed to request irq\n"); dev_err(dev, "failed to request irq\n");
goto err_get_irq; return ret;
} }
rot->clock = clk_get(dev, "rotator"); rot->clock = clk_get(dev, "rotator");
...@@ -724,10 +721,6 @@ static int __devinit rotator_probe(struct platform_device *pdev) ...@@ -724,10 +721,6 @@ static int __devinit rotator_probe(struct platform_device *pdev)
clk_put(rot->clock); clk_put(rot->clock);
err_clk_get: err_clk_get:
free_irq(rot->irq, rot); free_irq(rot->irq, rot);
err_get_irq:
devm_iounmap(dev, rot->regs);
err_get_resource:
devm_kfree(dev, rot);
return ret; return ret;
} }
...@@ -744,9 +737,6 @@ static int __devexit rotator_remove(struct platform_device *pdev) ...@@ -744,9 +737,6 @@ static int __devexit rotator_remove(struct platform_device *pdev)
clk_put(rot->clock); clk_put(rot->clock);
free_irq(rot->irq, rot); free_irq(rot->irq, rot);
devm_iounmap(dev, rot->regs);
devm_kfree(dev, rot);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment