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: 9221105 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 CC14160467 for ; Fri, 8 Jul 2016 14:47:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE7C928856 for ; Fri, 8 Jul 2016 14:47:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B341428859; Fri, 8 Jul 2016 14:47: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 66AD628856 for ; Fri, 8 Jul 2016 14:47:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755544AbcGHOrg (ORCPT ); Fri, 8 Jul 2016 10:47:36 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:47295 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755165AbcGHOrb (ORCPT ); Fri, 8 Jul 2016 10:47:31 -0400 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>; 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 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 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 7F2MnBwSAi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oCnRdPsHWJWIwDMmiQ8NrxlBHGaB7UwSx56uBari4BAW8JNoaHAC 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 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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: 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; }