From patchwork Thu Jul 28 16:17:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9251449 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 47FED6077C for ; Thu, 28 Jul 2016 16:17:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 384A327D4A for ; Thu, 28 Jul 2016 16:17:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CA2A27D5E; Thu, 28 Jul 2016 16:17:52 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 C535227D4A for ; Thu, 28 Jul 2016 16:17:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759101AbcG1QRv (ORCPT ); Thu, 28 Jul 2016 12:17:51 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35635 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759013AbcG1QRu (ORCPT ); Thu, 28 Jul 2016 12:17:50 -0400 Received: by mail-pf0-f194.google.com with SMTP id h186so3934820pfg.2 for ; Thu, 28 Jul 2016 09:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ioeNQYkxmsLwVoH6qtng5a/2uiJcDXoQ8sgmwGJV8Ug=; b=hVjsmJDPoFGkRgpfw7N87aBsTlpwnoYNsLpvsH1N9sW81R1N80x9IL2JuFtC3vilJA s5GJJ4IEH0yQm31ycIO+fyWoavipAVSqgDgUx+jaOjpHbCc0IoI9G5gTr0yWoJ8i/gNF p27iCF2pX0TAmreQBAf5jYja4HAH7ngPQKa59+Tc+o42k5UBdC6c3R6UUuHaaodV2w9P kta1wwWvNBAbjFN6MNqcIWvLwHIFWgH0tTcAP/f8DivK9MGeDdIF63qUZV2wLwPDyvD3 Ld8l08Grf8kujTxfv5YzeGkZ/X5hM65kX/ErE1ekpfcsOfPW9gowYFounA56a22n3gt5 oSwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ioeNQYkxmsLwVoH6qtng5a/2uiJcDXoQ8sgmwGJV8Ug=; b=Bxzw1t5SLjQ6mpPfD3w+QVwSrnKiu3UfaEv1qYtIgBQA+24Z+SmvsHKL/+oEzGZ5yd BTjdIUBUdHtdFKODMq1QmPDc0fr46eidNC8pF3mBIaMp2XWYMHYA+Ssp0JsxwyxqwZ23 X4jx9qN1HZvhZRGLsp0+2y9lrizz3AsdgdJ15pd73sY6TQd9KCyLlVP9gTfkGyq37voW j7Vixsrs6uPN2Br0GPgFkN2YLI844kl4j2VzOOmDUNFseoxk/BT+FAi+aSYzki83NSzp NApmHE0L/ld+NlmHyEoWNo7Kx7T0ciz7HqSru8ixNIwebNpg37dM3CRYW+mIEliU36UD NPNA== X-Gm-Message-State: AEkoouv7Qvth5OKvnqlCxdbM5NZFwgt40obQ/b8Z7pIcfCCZJ9jlh5yhi+sSBEr7vHJ32A== X-Received: by 10.98.27.200 with SMTP id b191mr60335821pfb.111.1469722669953; Thu, 28 Jul 2016 09:17:49 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id te10sm18424581pac.4.2016.07.28.09.17.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 09:17:49 -0700 (PDT) From: Wei Yongjun To: Adrian Hunter , Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden Cc: Wei Yongjun , bcm-kernel-feedback-list@broadcom.com, linux-mmc@vger.kernel.org Subject: [PATCH -next] mmc: sdhci-bcm-kona: fix error return code in sdhci_bcm_kona_probe() Date: Thu, 28 Jul 2016 16:17:44 +0000 Message-Id: <1469722664-15136-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In clk_set_rate() or clk_prepare_enable() error handling case, the error return code ret is not set, so sdhci_bcm_kona_probe() return 0 in those error cases. Signed-off-by: Wei Yongjun Acked-by: Ray Jui Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-bcm-kona.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index e5c634b..51dd2fd 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -253,12 +253,14 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev) goto err_pltfm_free; } - if (clk_set_rate(pltfm_priv->clk, host->mmc->f_max) != 0) { + ret = clk_set_rate(pltfm_priv->clk, host->mmc->f_max); + if (ret) { dev_err(dev, "Failed to set rate core clock\n"); goto err_pltfm_free; } - if (clk_prepare_enable(pltfm_priv->clk) != 0) { + ret = clk_prepare_enable(pltfm_priv->clk); + if (ret) { dev_err(dev, "Failed to enable core clock\n"); goto err_pltfm_free; }