From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752919AbcEDL6I (ORCPT ); Wed, 4 May 2016 07:58:08 -0400 Received: from mail-bl2nam02on0073.outbound.protection.outlook.com ([104.47.38.73]:14752 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751239AbcEDL6G (ORCPT ); Wed, 4 May 2016 07:58:06 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Shubhrajyoti Datta To: CC: , , , Shubhrajyoti Datta Subject: [PATCH] spi: zynqmp: disable clocks in error paths Date: Wed, 4 May 2016 17:27:50 +0530 Message-ID: <1462363070-33890-1-git-send-email-shubhraj@xilinx.com> X-Mailer: git-send-email 2.1.2 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22300.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(33646002)(229853001)(5003940100001)(2351001)(90966002)(5008740100001)(47776003)(107886002)(92566002)(6806005)(11100500001)(4001430100002)(63266004)(42186005)(50226002)(86362001)(81166005)(4326007)(50986999)(2906002)(110136002)(87936001)(189998001)(45336002)(36756003)(52956003)(1220700001)(586003)(19580395003)(19580405001)(48376002)(103686003)(36386004)(106466001)(8936002)(50466002)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1NAM02HT042;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 87fcb922-72a4-48ca-9787-08d3741358ec X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:SN1NAM02HT042; X-Microsoft-Antispam-PRVS: <320026537bd541fe9bfdf5cc84bb566c@SN1NAM02HT042.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521098)(9101528026)(601004)(2401047)(5005006)(13015025)(13024025)(13023025)(13018025)(13017025)(8121501046)(10201501046)(3002001)(6055026);SRVR:SN1NAM02HT042;BCL:0;PCL:0;RULEID:;SRVR:SN1NAM02HT042; X-Forefront-PRVS: 093290AD39 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2016 11:58:03.2754 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM02HT042 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The if pclk enable fails the refclk is not disabled. Fix the same. Signed-off-by: Shubhrajyoti Datta --- drivers/spi/spi-zynqmp-gqspi.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index aab9b49..18aeace 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -360,7 +360,7 @@ static int zynqmp_prepare_transfer_hardware(struct spi_master *master) ret = clk_enable(xqspi->refclk); if (ret) - goto clk_err; + return ret; ret = clk_enable(xqspi->pclk); if (ret) @@ -369,6 +369,7 @@ static int zynqmp_prepare_transfer_hardware(struct spi_master *master) zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, GQSPI_EN_MASK); return 0; clk_err: + clk_disable(xqspi->refclk); return ret; } -- 1.7.1