[media] exynos4-is: Fix error paths in probe() for !pm_runtime_enabled()
Ensure clk_disable() is called on error paths only when clk_enable() was previously called. This fixes following build warning: .../media-git/drivers/media/platform/exynos4-is/fimc-lite.c: In function 'fimc_lite_probe': .../media-git/drivers/media/platform/exynos4-is/fimc-lite.c:1583:1: warning: label 'err_sd' defined but not used [-Wunused-label] Reported-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
a62cffefc9
commit
a27a19d615
|
@ -1027,7 +1027,8 @@ static int fimc_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_gclk:
|
||||
clk_disable(fimc->clock[CLK_GATE]);
|
||||
if (!pm_runtime_enabled(dev))
|
||||
clk_disable(fimc->clock[CLK_GATE]);
|
||||
err_sd:
|
||||
fimc_unregister_capture_subdev(fimc);
|
||||
err_sclk:
|
||||
|
|
|
@ -1563,7 +1563,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
|
|||
if (!pm_runtime_enabled(dev)) {
|
||||
ret = clk_enable(fimc->clock);
|
||||
if (ret < 0)
|
||||
goto err_clk_put;
|
||||
goto err_sd;
|
||||
}
|
||||
|
||||
fimc->alloc_ctx = vb2_dma_contig_init_ctx(dev);
|
||||
|
@ -1579,7 +1579,8 @@ static int fimc_lite_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_clk_dis:
|
||||
clk_disable(fimc->clock);
|
||||
if (!pm_runtime_enabled(dev))
|
||||
clk_disable(fimc->clock);
|
||||
err_sd:
|
||||
fimc_lite_unregister_capture_subdev(fimc);
|
||||
err_clk_put:
|
||||
|
|
Loading…
Reference in New Issue