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: 9224913 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 E93D960868 for ; Tue, 12 Jul 2016 10:02:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D95E227F7F for ; Tue, 12 Jul 2016 10:02:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD87227F9E; Tue, 12 Jul 2016 10:02:37 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34D2927F7F for ; Tue, 12 Jul 2016 10:02:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753698AbcGLKCd (ORCPT ); Tue, 12 Jul 2016 06:02:33 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:46912 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753677AbcGLKC3 (ORCPT ); Tue, 12 Jul 2016 06:02:29 -0400 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>; 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 Cc: Chanwoo Choi , Jaehoon Chung , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org, Andi Shyti , Andi Shyti 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 8zm6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hfGSU+PzwIRNIFZuApkTT7R9gVSICz5gkPjS8ZgRxmAW2M0kce7qWFaRKWMBPYmHz 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 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.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; }