diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-12-24 03:33:46 -0500 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2013-01-04 01:54:34 -0500 |
commit | 6eac74d1b112c8381f483a97217446d79a611efa (patch) | |
tree | 1e8b00a4b29e82f59701ed45ba5a06fe83cb092c /drivers/gpu | |
parent | 15b3263eb3267b2be06f969f775f2e34624c7259 (diff) |
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: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_rotator.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 8bf9c5016c01..9634cf17cf52 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c | |||
@@ -658,29 +658,26 @@ static int __devinit rotator_probe(struct platform_device *pdev) | |||
658 | rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 658 | rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
659 | if (!rot->regs_res) { | 659 | if (!rot->regs_res) { |
660 | dev_err(dev, "failed to find registers\n"); | 660 | dev_err(dev, "failed to find registers\n"); |
661 | ret = -ENOENT; | 661 | return -ENOENT; |
662 | goto err_get_resource; | ||
663 | } | 662 | } |
664 | 663 | ||
665 | rot->regs = devm_request_and_ioremap(dev, rot->regs_res); | 664 | rot->regs = devm_request_and_ioremap(dev, rot->regs_res); |
666 | if (!rot->regs) { | 665 | if (!rot->regs) { |
667 | dev_err(dev, "failed to map register\n"); | 666 | dev_err(dev, "failed to map register\n"); |
668 | ret = -ENXIO; | 667 | return -ENXIO; |
669 | goto err_get_resource; | ||
670 | } | 668 | } |
671 | 669 | ||
672 | rot->irq = platform_get_irq(pdev, 0); | 670 | rot->irq = platform_get_irq(pdev, 0); |
673 | if (rot->irq < 0) { | 671 | if (rot->irq < 0) { |
674 | dev_err(dev, "failed to get irq\n"); | 672 | dev_err(dev, "failed to get irq\n"); |
675 | ret = rot->irq; | 673 | return rot->irq; |
676 | goto err_get_irq; | ||
677 | } | 674 | } |
678 | 675 | ||
679 | ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, | 676 | ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, |
680 | IRQF_ONESHOT, "drm_rotator", rot); | 677 | IRQF_ONESHOT, "drm_rotator", rot); |
681 | if (ret < 0) { | 678 | if (ret < 0) { |
682 | dev_err(dev, "failed to request irq\n"); | 679 | dev_err(dev, "failed to request irq\n"); |
683 | goto err_get_irq; | 680 | return ret; |
684 | } | 681 | } |
685 | 682 | ||
686 | rot->clock = clk_get(dev, "rotator"); | 683 | rot->clock = clk_get(dev, "rotator"); |
@@ -724,10 +721,6 @@ err_ippdrv_register: | |||
724 | clk_put(rot->clock); | 721 | clk_put(rot->clock); |
725 | err_clk_get: | 722 | err_clk_get: |
726 | free_irq(rot->irq, rot); | 723 | free_irq(rot->irq, rot); |
727 | err_get_irq: | ||
728 | devm_iounmap(dev, rot->regs); | ||
729 | err_get_resource: | ||
730 | devm_kfree(dev, rot); | ||
731 | return ret; | 724 | return ret; |
732 | } | 725 | } |
733 | 726 | ||
@@ -744,9 +737,6 @@ static int __devexit rotator_remove(struct platform_device *pdev) | |||
744 | clk_put(rot->clock); | 737 | clk_put(rot->clock); |
745 | 738 | ||
746 | free_irq(rot->irq, rot); | 739 | free_irq(rot->irq, rot); |
747 | devm_iounmap(dev, rot->regs); | ||
748 | |||
749 | devm_kfree(dev, rot); | ||
750 | 740 | ||
751 | return 0; | 741 | return 0; |
752 | } | 742 | } |