From patchwork Fri Jan 18 17:07:32 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: 2003931 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 51828DF280 for ; Fri, 18 Jan 2013 17:07:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751487Ab3ARRHs (ORCPT ); Fri, 18 Jan 2013 12:07:48 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:64322 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507Ab3ARRHs (ORCPT ); Fri, 18 Jan 2013 12:07:48 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MGT005VOZKY8200@mailout1.samsung.com> for linux-media@vger.kernel.org; Sat, 19 Jan 2013 02:07:46 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-5f-50f98162f688 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id C5.88.12699.26189F05; Sat, 19 Jan 2013 02:07:46 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MGT008MLZKPCN80@mmp2.samsung.com> for linux-media@vger.kernel.org; Sat, 19 Jan 2013 02:07:46 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: sw0312.kim@samsung.com, dh09.lee@samsung.com, Sylwester Nawrocki , Kyungmin Park Subject: [PATCH] s5p-csis: Fix clock handling on error path in probe() Date: Fri, 18 Jan 2013 18:07:32 +0100 Message-id: <1358528852-13858-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFJMWRmVeSWpSXmKPExsVy+t9jQd2kxp8BBo3PlSx6NmxldWD0+LxJ LoAxissmJTUnsyy1SN8ugSvj/dx5rAVLhSqmn/3G3MC4QqCLkZNDQsBEYvWEw6wQtpjEhXvr 2boYuTiEBKYzSszpPswC4axgkvj5t40FpIpNwFCi92gfI4gtIiAv8aT3BlgHs0APo8SV+53M IAlhATeJW1+ugtksAqoSczZvBWvmBYpPvPoNKM4BtE5BYs4kmwmM3AsYGVYxiqYWJBcUJ6Xn GukVJ+YWl+al6yXn525iBPvwmfQOxlUNFocYBTgYlXh4N6r8CBBiTSwrrsw9xCjBwawkwvtE 6meAEG9KYmVValF+fFFpTmrxIUZpDhYlcV7GU08ChATSE0tSs1NTC1KLYLJMHJxSDYwpdYEv NlxSiz9ebLJhXb9GxpUHc49+90uTf6h9NHrWqp92pR03Z9VE73Ztev/sZvyrjMNnNmSFpO69 Nu/y51uVedu2/A6/kTb94ra3hf+8krjlLkxb5vO1Iq/+r57qlI6SnPi0zBt/PFm67wstidrv WHZB//udRyECj+euqZlscdWp6qCAiu0bJZbijERDLeai4kQAko+hiN0BAAA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Move e_clkput label after the clk_disable() call so a not acquired clock is not attempted to be disabled. This fixes runtime warnings like: s5p-mipi-csis 11880000.csis: failed to get clock: sclk_csis ------------[ cut here ]------------ WARNING: at drivers/clk/clk.c:478 clk_disable+0x24/0x34() Modules linked in: [] (unwind_backtrace+0x0/0x13c) from [] (warn_slowpath_common+0x54/0x64) [] (warn_slowpath_common+0x54/0x64) from [] (warn_slowpath_null+0x1c/0x24) [] (warn_slowpath_null+0x1c/0x24) from [] (clk_disable+0x24/0x34) [] (clk_disable+0x24/0x34) from [] (s5pcsis_probe+0x25c/0x4c8) [] (s5pcsis_probe+0x25c/0x4c8) from [] (platform_drv_probe+0x18/0x1c) [] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0xa4/0x368) [] (driver_probe_device+0xa4/0x368) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x60/0x8c) [] (bus_for_each_dev+0x60/0x8c) from [] (bus_add_driver+0x20c/0x2d4) [] (bus_add_driver+0x20c/0x2d4) from [] (driver_register+0x78/0x194) [] (driver_register+0x78/0x194) from [] (do_one_initcall+0x34/0x188) [] (do_one_initcall+0x34/0x188) from [] (kernel_init+0x180/0x2f0) [] (kernel_init+0x180/0x2f0) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 0c5a55345c42530b ]--- Cc: stable@vger.kernel.org # 3.4 Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/platform/s5p-fimc/mipi-csis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index 357ef2a..1dc52a0 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c @@ -873,8 +873,8 @@ static int __devinit s5pcsis_probe(struct platform_device *pdev) e_regput: regulator_bulk_free(CSIS_NUM_SUPPLIES, state->supplies); -e_clkput: clk_disable(state->clock[CSIS_CLK_MUX]); +e_clkput: s5pcsis_clk_put(state); return ret; }