From patchwork Fri Jul 8 14:46:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9221141 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 1C71260467 for ; Fri, 8 Jul 2016 14:49:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C6BC28846 for ; Fri, 8 Jul 2016 14:49:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00C5E2885C; Fri, 8 Jul 2016 14:49:25 +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 88DF328846 for ; Fri, 8 Jul 2016 14:49:25 +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 1bLX4a-0000cH-Rm; Fri, 08 Jul 2016 14:48:08 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLX4I-0000PG-RY for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2016 14:47:51 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OA000WCM3R44650@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2016 23:47:28 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.113]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id AF.8D.05174.00DBF775; Fri, 8 Jul 2016 23:47:28 +0900 (KST) X-AuditID: cbfee68d-f79876d000001436-83-577fbd0099b2 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 44.55.04429.00DBF775; Fri, 8 Jul 2016 07:47:28 -0700 (MST) 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 <0OA000AMT3QD1730@mmp2.samsung.com>; Fri, 08 Jul 2016 23:47:27 +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 v2 4/7] spi: s3c64xx: use error code from clk_prepare_enable() Date: Fri, 08 Jul 2016 23:46:38 +0900 Message-id: <1467989201-14661-5-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1467989201-14661-1-git-send-email-andi.shyti@samsung.com> References: <1467989201-14661-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsWyRsSkUJdhb324waL9BhbbjzxjtVj84zmT xdSHT9gsrn95zmox/8g5Vosbv9pYLV6/MLTof/ya2WLT42usFh977rFazDi/j8mi8eNNdoul 1y8yWVw85WrRuvcIu8XhN+2sFj/OdLNYrNr1h9FByGPNvDWMHu9vtLJ7XO7rZfK4vuQTs8fO WXfZPTat6mTz2Lyk3qNvyypGj8+b5AI4o7hsUlJzMstSi/TtErgyNrxKK/jPUbHm6XXGBsbN 7F2MnBwSAiYSc25v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PsHWJWIwDMmiQ8NrxlBHGaB7UwSx56uBari4BAW8JNoaHAC aWARUJWYuaiNCcTmFXCTWPz6JTPEOjmJy9MfsIHYnALuEgdW/gJbIARUc/nuF/YJjLwLGBlW MUqkFiQXFCel5xrlpZbrFSfmFpfmpesl5+duYgRH9zPpHYyHd7kfYhTgYFTi4Q2oqw8XYk0s K67MPcQowcGsJMIrtgsoxJuSWFmVWpQfX1Sak1p8iNEU6LCJzFKiyfnAxJNXEm9obGJmZGlk bmhhZGyuJM77+P+6MCGB9MSS1OzU1ILUIpg+Jg5OqQZGo5wVpVOec9222LnzuNGJxzNzDSRr NRbOciyb0tKWa/1tWlxG/9FNSQsVDcIubmLY9oQh9ec0Zinr3XvXncn7PHefVru1Sc3vU6HR m3e+LVbjmqc5rzGxSaVtoWWe4U2H+2x5HTdOFrovsHnGU7fm4P9jvB0BvFGTdb+XbFjQcTMu 0vH51ElflViKMxINtZiLihMBIeklOgQDAAA= 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-20160708_074751_041147_28B707E8 X-CRM114-Status: GOOD ( 13.14 ) 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: 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; }