Commit 7a531974 authored by Arvind Yadav's avatar Arvind Yadav Committed by Thadeu Lima de Souza Cascardo

exynos4-is: fimc-is: Unmap region obtained by of_iomap()

BugLink: http://bugs.launchpad.net/bugs/1731915

[ Upstream commit 4742575c ]

Free memory mapping, if fimc_is_probe is not successful.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 5cab75a3
...@@ -815,12 +815,13 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -815,12 +815,13 @@ static int fimc_is_probe(struct platform_device *pdev)
is->irq = irq_of_parse_and_map(dev->of_node, 0); is->irq = irq_of_parse_and_map(dev->of_node, 0);
if (!is->irq) { if (!is->irq) {
dev_err(dev, "no irq found\n"); dev_err(dev, "no irq found\n");
return -EINVAL; ret = -EINVAL;
goto err_iounmap;
} }
ret = fimc_is_get_clocks(is); ret = fimc_is_get_clocks(is);
if (ret < 0) if (ret < 0)
return ret; goto err_iounmap;
platform_set_drvdata(pdev, is); platform_set_drvdata(pdev, is);
...@@ -880,6 +881,8 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -880,6 +881,8 @@ static int fimc_is_probe(struct platform_device *pdev)
free_irq(is->irq, is); free_irq(is->irq, is);
err_clk: err_clk:
fimc_is_put_clocks(is); fimc_is_put_clocks(is);
err_iounmap:
iounmap(is->pmu_regs);
return ret; return ret;
} }
...@@ -935,6 +938,7 @@ static int fimc_is_remove(struct platform_device *pdev) ...@@ -935,6 +938,7 @@ static int fimc_is_remove(struct platform_device *pdev)
fimc_is_unregister_subdevs(is); fimc_is_unregister_subdevs(is);
vb2_dma_contig_cleanup_ctx(is->alloc_ctx); vb2_dma_contig_cleanup_ctx(is->alloc_ctx);
fimc_is_put_clocks(is); fimc_is_put_clocks(is);
iounmap(is->pmu_regs);
fimc_is_debugfs_remove(is); fimc_is_debugfs_remove(is);
release_firmware(is->fw.f_w); release_firmware(is->fw.f_w);
fimc_is_free_cpu_memory(is); fimc_is_free_cpu_memory(is);
......
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