From patchwork Tue Jul 12 10:02:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9224965 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3E43360868 for ; Tue, 12 Jul 2016 10:04:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DD6F27CF9 for ; Tue, 12 Jul 2016 10:04:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 226D527F7F; Tue, 12 Jul 2016 10:04:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF50927CF9 for ; Tue, 12 Jul 2016 10:04:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bMuWj-0004uO-3E; Tue, 12 Jul 2016 10:02:53 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bMuWf-0004rc-Ci for linux-arm-kernel@lists.infradead.org; Tue, 12 Jul 2016 10:02:50 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OA700ZKT5824A90@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 12 Jul 2016 19:02:26 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.113]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 92.E5.05174.230C4875; Tue, 12 Jul 2016 19:02:26 +0900 (KST) X-AuditID: cbfee68d-f79876d000001436-90-5784c0329e0f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 32.9C.02101.230C4875; Tue, 12 Jul 2016 19:02:26 +0900 (KST) Received: from samsunx.samsung ([10.113.63.54]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OA7009HH57YEU50@mmp2.samsung.com>; Tue, 12 Jul 2016 19:02:25 +0900 (KST) From: Andi Shyti To: Rob Herring , Mark Rutland , Kukjin Kim , Krzysztof Kozlowski , Mark Brown , Sylwester Nawrocki , Tomasz Figa , Michael Turquette , Stephen Boyd Subject: [PATCH v3 4/7] spi: s3c64xx: use error code from clk_prepare_enable() Date: Tue, 12 Jul 2016 19:02:13 +0900 Message-id: <1468317736-18841-5-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1468317736-18841-1-git-send-email-andi.shyti@samsung.com> References: <1468317736-18841-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsWyRsSkUNfoQEu4wdPNchbbjzxjtVj84zmT xdSHT9gsrn95zmox/8g5Vosbv9pYLV6/MLTof/ya2WLT42usFh977rFazDi/j8mi8eNNdoul 1y8yWVw85WrRuvcIu8XhN+2sFj/OdLNYrNr1h9FByGPNvDWMHu9vtLJ7XO7rZfK4vuQTs8fO WXfZPTat6mTz2Lyk3qNvyypGj8+b5AI4o7hsUlJzMstSi/TtErgy5m2bw1bwlbNi2YWX7A2M 8zm6GDk5JARMJ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wIRNIFZuApkTT7R9gVSICz5gkPjS8ZgRxmAW2M0kce7qWFaRKWMBPYmHz YzCbRUBV4lfPfiCbg4NXwE3ixIckiHVyEpenP2ADsTkF3CUmt64EWyAEVDLv9Q7WCYy8CxgZ VjFKpBYkFxQnpeca5qWW6xUn5haX5qXrJefnbmIEx/czqR2MB3e5H2IU4GBU4uFdUNISLsSa WFZcmXuIUYKDWUmE98peoBBvSmJlVWpRfnxRaU5q8SFGU6C7JjJLiSbnA1NPXkm8obGJmZGl kbmhhZGxuZI47+P/68KEBNITS1KzU1MLUotg+pg4OKUaGGsNv1edujBr9eX6+ydXnHi63Fcw xCDhylfvb70NLSYSnpblm+4ni7k++MZ4WElp1ldn1zNT1/0SEn4leioy8KfWbknZXToBZmc/ /ri06+SU7Gij7NxOy/XXLrPK6q/mvm7Y/fHt3FUly5ZlmldxyxzKEN9eWbZBpPOWg7ijuMSX zZvXxUaevqbEUpyRaKjFXFScCAABGyM8BQMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160712_030249_585422_902A0271 X-CRM114-Status: GOOD ( 13.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Andi Shyti , linux-spi@vger.kernel.org, Jaehoon Chung , Chanwoo Choi , Andi Shyti , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP If clk_prepare_enable() fails do not return -EBUSY but use the value provided by the function itself. Suggested-by: Krzysztof Kozlowski Signed-off-by: Andi Shyti Reviewed-by: Michael Turquette Reviewed-by: Krzysztof Kozlowski --- drivers/spi/spi-s3c64xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 0784a4d..3a65adf 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1126,9 +1126,9 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) goto err_deref_master; } - if (clk_prepare_enable(sdd->clk)) { + ret = clk_prepare_enable(sdd->clk); + if (ret) { dev_err(&pdev->dev, "Couldn't enable clock 'spi'\n"); - ret = -EBUSY; goto err_deref_master; } @@ -1141,9 +1141,9 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) goto err_disable_clk; } - if (clk_prepare_enable(sdd->src_clk)) { + ret = clk_prepare_enable(sdd->src_clk); + if (ret) { dev_err(&pdev->dev, "Couldn't enable clock '%s'\n", clk_name); - ret = -EBUSY; goto err_disable_clk; }