Skip to content

Commit

Permalink
[media] exynos4-is: Fix runtime PM handling on fimc-is probe error path
Browse files Browse the repository at this point in the history
Ensure there is no unbalanced pm_runtime_put().

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Apr 25, 2013
1 parent 0e30c7e commit b34f51f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/media/platform/exynos4-is/fimc-is.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,16 +847,17 @@ static int fimc_is_probe(struct platform_device *pdev)
goto err_irq;

ret = fimc_is_setup_clocks(is);
pm_runtime_put_sync(dev);

if (ret < 0)
goto err_irq;

pm_runtime_put_sync(dev);
is->clk_init = true;

is->alloc_ctx = vb2_dma_contig_init_ctx(dev);
if (IS_ERR(is->alloc_ctx)) {
ret = PTR_ERR(is->alloc_ctx);
goto err_pm;
goto err_irq;
}
/*
* Register FIMC-IS V4L2 subdevs to this driver. The video nodes
Expand Down Expand Up @@ -885,8 +886,6 @@ static int fimc_is_probe(struct platform_device *pdev)
fimc_is_unregister_subdevs(is);
err_irq:
free_irq(is->irq, is);
err_pm:
pm_runtime_put(dev);
err_clk:
fimc_is_put_clocks(is);
return ret;
Expand Down

0 comments on commit b34f51f

Please sign in to comment.