From patchwork Mon Apr 22 14:03:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2472091 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AD76A3FCA5 for ; Mon, 22 Apr 2013 14:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752531Ab3DVOHb (ORCPT ); Mon, 22 Apr 2013 10:07:31 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:23946 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989Ab3DVOHa (ORCPT ); Mon, 22 Apr 2013 10:07:30 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MLN00JMYTW396L0@mailout3.samsung.com> for linux-media@vger.kernel.org; Mon, 22 Apr 2013 23:07:29 +0900 (KST) X-AuditID: cbfee61a-b7f156d000002a55-9d-517544217817 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 63.B7.10837.12445715; Mon, 22 Apr 2013 23:07:29 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MLN004L3TQD2V50@mmp1.samsung.com>; Mon, 22 Apr 2013 23:07:29 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com, a.hajda@samsung.com, Sylwester Nawrocki Subject: [PATCH 12/12] exynos4-is: Fix runtime PM handling on fimc-is probe error path Date: Mon, 22 Apr 2013 16:03:47 +0200 Message-id: <1366639427-14253-13-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1366639427-14253-1-git-send-email-s.nawrocki@samsung.com> References: <1366639427-14253-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBJMWRmVeSWpSXmKPExsVy+t9jAV1Fl9JAg+P31CxurTvHanG26Q27 Rc+GrawWh9+0s1rMmPySzYHVo2/LKkaPz5vkApiiuGxSUnMyy1KL9O0SuDJ6Hi9gLTjAWbHi Ui9jA+MH9i5GTg4JAROJSY9nM0PYYhIX7q1nA7GFBBYxSlxYK9vFyAVkdzBJ9H5qYgVJsAkY SvQe7WMEsUUE5CWe9N4Aa2AWqJTYsPYp2CBhgQiJpueXwBawCKhKtC98BRTn4OAVcJdY3SkC YkoIKEjMmWQDUsEJFP2y5AYrxFo3iU0rb7BPYORdwMiwilE0tSC5oDgpPddQrzgxt7g0L10v OT93EyM4PJ5J7WBc2WBxiFGAg1GJh3elWWmgEGtiWXFl7iFGCQ5mJRHeu69LAoV4UxIrq1KL 8uOLSnNSiw8xSnOwKInzHmi1DhQSSE8sSc1OTS1ILYLJMnFwSjUwBmXsEV0g9/RX472bda/+ inR7Oyf17dzQb/2k+cVPj8kly3OzplbMW8SeUVj188yWvYovNhnadfXu4XLX2t17pqE2dVLw sboJ9tzCqZK53Sx6rRLKB9d598+I8lrR9prPdt6cmffYDj/ineIuOnOl6DXNuPOhJ3QavzIs WyIi/K7lS+312sq1SizFGYmGWsxFxYkAMqImegsCAAA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Ensure there is no unbalanced pm_runtime_put(). Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/platform/exynos4-is/fimc-is.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 5e89077..47c6363 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -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 @@ -885,8 +886,6 @@ err_sd: 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;