summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos4-is
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2016-12-06 10:42:51 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-31 15:02:53 +0300
commit4742575cde1f3cee0ea6b41af42781672315b04b (patch)
treef4396fa38595307e79aaf60d0568f9e1b2682fb8 /drivers/media/platform/exynos4-is
parentcb610c8fdfbe06dfb7534470a96a01adc19fc7cc (diff)
downloadlinux-4742575cde1f3cee0ea6b41af42781672315b04b.tar.xz
[media] exynos4-is: fimc-is: Unmap region obtained by of_iomap()
Free memory mapping, if fimc_is_probe is not successful. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is')
-rw-r--r--drivers/media/platform/exynos4-is/fimc-is.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 518ad34f80d7..7f92144a1de3 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -825,12 +825,13 @@ static int fimc_is_probe(struct platform_device *pdev)
is->irq = irq_of_parse_and_map(dev->of_node, 0);
if (!is->irq) {
dev_err(dev, "no irq found\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto err_iounmap;
}
ret = fimc_is_get_clocks(is);
if (ret < 0)
- return ret;
+ goto err_iounmap;
platform_set_drvdata(pdev, is);
@@ -891,6 +892,8 @@ err_irq:
free_irq(is->irq, is);
err_clk:
fimc_is_put_clocks(is);
+err_iounmap:
+ iounmap(is->pmu_regs);
return ret;
}
@@ -947,6 +950,7 @@ static int fimc_is_remove(struct platform_device *pdev)
fimc_is_unregister_subdevs(is);
vb2_dma_contig_clear_max_seg_size(dev);
fimc_is_put_clocks(is);
+ iounmap(is->pmu_regs);
fimc_is_debugfs_remove(is);
release_firmware(is->fw.f_w);
fimc_is_free_cpu_memory(is);