From patchwork Wed Nov 19 13:16:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5337271 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE0A9C11AC for ; Wed, 19 Nov 2014 13:17:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D740F201F2 for ; Wed, 19 Nov 2014 13:17:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14038201EF for ; Wed, 19 Nov 2014 13:17:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753829AbaKSNRQ (ORCPT ); Wed, 19 Nov 2014 08:17:16 -0500 Received: from mail-bn1bon0110.outbound.protection.outlook.com ([157.56.111.110]:62674 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752315AbaKSNRP (ORCPT ); Wed, 19 Nov 2014 08:17:15 -0500 Received: from BY2PR03CA066.namprd03.prod.outlook.com (10.141.249.39) by BY2PR03MB253.namprd03.prod.outlook.com (10.242.37.15) with Microsoft SMTP Server (TLS) id 15.1.16.15; Wed, 19 Nov 2014 13:17:12 +0000 Received: from BN1AFFO11FD022.protection.gbl (2a01:111:f400:7c10::166) by BY2PR03CA066.outlook.office365.com (2a01:111:e400:2c5d::39) with Microsoft SMTP Server (TLS) id 15.1.16.15 via Frontend Transport; Wed, 19 Nov 2014 13:17:12 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD022.mail.protection.outlook.com (10.58.52.82) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Wed, 19 Nov 2014 13:17:11 +0000 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.244.75]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id sAJDH6Sk006141; Wed, 19 Nov 2014 06:17:10 -0700 From: Fabio Estevam To: CC: , , Fabio Estevam Subject: [PATCH 3/3] mmc: mxs-mmc: Check for clk_prepare_enable() error Date: Wed, 19 Nov 2014 11:16:59 -0200 Message-ID: <1416403019-6353-3-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416403019-6353-1-git-send-email-fabio.estevam@freescale.com> References: <1416403019-6353-1-git-send-email-fabio.estevam@freescale.com> X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Fabio.Estevam@freescale.com; X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(6806004)(44976005)(229853001)(2351001)(107046002)(77156002)(50466002)(62966003)(21056001)(102836001)(36756003)(50986999)(76176999)(48376002)(105606002)(46102003)(97736003)(92726001)(92566001)(86362001)(47776003)(95666004)(64706001)(93916002)(20776003)(4396001)(50226001)(31966008)(106466001)(120916001)(110136001)(87936001)(99396003)(87286001)(104016003)(68736004)(84676001)(85426001)(33646002)(19580395003)(19580405001)(104166001)(88136002)(89996001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB253; H:tx30smr01.am.freescale.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB253; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB253; X-Forefront-PRVS: 04004D94E2 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB253; X-OriginatorOrg: freescale.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clk_prepare_enable() may fail and in this case we should propagate the error. Signed-off-by: Fabio Estevam --- drivers/mmc/host/mxs-mmc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index f2c49e0..60c4ca9 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -619,7 +619,9 @@ static int mxs_mmc_probe(struct platform_device *pdev) ret = PTR_ERR(ssp->clk); goto out_mmc_free; } - clk_prepare_enable(ssp->clk); + ret = clk_prepare_enable(ssp->clk); + if (ret) + goto out_mmc_free; ret = mxs_mmc_reset(host); if (ret) { @@ -719,8 +721,7 @@ static int mxs_mmc_resume(struct device *dev) struct mxs_mmc_host *host = mmc_priv(mmc); struct mxs_ssp *ssp = &host->ssp; - clk_prepare_enable(ssp->clk); - return 0; + return clk_prepare_enable(ssp->clk); } #endif