Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3488420pxp; Tue, 8 Mar 2022 15:45:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxj2HSHzibZ3tQ2n68oZdOewhdjWaoIugXPOj9SrJztF0W5OrR1k77OzmkaBrvSajSo9jn X-Received: by 2002:a17:902:ec81:b0:151:f1c5:2f9f with SMTP id x1-20020a170902ec8100b00151f1c52f9fmr10705809plg.123.1646783100169; Tue, 08 Mar 2022 15:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646783100; cv=none; d=google.com; s=arc-20160816; b=Rb95AwwVsrzLjG/V3suMBFOOGIyxde61hfEwW+p2HmNAUk1X2rqk8izo5eGeWJrE9z lBIgAs9mQZs+BME8fiSl4RqHP6tDyh47ejAiClEZSFFflvJwVnxLfu5nGDLQTcqHIVln HLlmGstJ5S818n9Bp8zOdGtiMuK/Lm13kZXNYio2kXZ1716vG5uTsF5F35p1EkahWoVf OTixOhViyff95/lDOriT4b3Sc8eCaLPsrPU+86Tv8CN1v4Sf75mIm/RRi34KMQE3T1KA c972xLcrGZBp58zaMl5BxVNqaJq69ufeCZhrfvpvUD6BYh9y2pIKzYE9iWSDUR30sBiQ Orjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=OvebD0yqqeIe37iQp6dkVYjpS3UoGu9/5TJKB01H0L4=; b=lhzFfyPT0qQr5UEo6UIQBgoZF+ENLSxFC8cAnTOp+4t2yMlaoBw8X1xRj/EMEHpCdw j59/Oubs0vl2idIhypIcLw8GeHl/zFCpE2WhgqeSbM/0f4+CtLW87yEPneefuOFEE6pe geOsK+IwmtjGNH/jAHTDltKE6igOXntl5KXvG4jM8ZDImbaUp1BdpbV23creVDO7OtoJ unekuqIbh1DmU4vuNL5CeMZ4HKNj48DAPg3mW9C+TDfkdC7gquLrehVLGwLGpH2sV5+c 8xHLTqZTksRZXCuEWIp/329M4qKB2Ic9XsgWbw6dvtRolasIJPeqPFKgg/N4WdU1AVYr SsZw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s193-20020a6277ca000000b004bcdf41d07asi229929pfc.93.2022.03.08.15.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 15:45:00 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F108BDE72; Tue, 8 Mar 2022 15:27:14 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344531AbiCHHPR (ORCPT + 99 others); Tue, 8 Mar 2022 02:15:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344510AbiCHHPQ (ORCPT ); Tue, 8 Mar 2022 02:15:16 -0500 Received: from cstnet.cn (smtp84.cstnet.cn [159.226.251.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B15133BBF0 for ; Mon, 7 Mar 2022 23:14:20 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-05 (Coremail) with SMTP id zQCowAA3P9tJAidimDCCAg--.20542S2; Tue, 08 Mar 2022 15:14:18 +0800 (CST) From: Jiasheng Jiang To: ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] mmc: davinci_mmc: Handle error for clk_enable Date: Tue, 8 Mar 2022 15:14:15 +0800 Message-Id: <20220308071415.1093393-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: zQCowAA3P9tJAidimDCCAg--.20542S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr47tF1xGF13ZF4UXr43KFg_yoWfCFg_CF W3WrZ7Xr4YkFyrua17X34xAFyrtr1DuF1xuw48ta1ft34DJrn7Z3s7uw1DCr15Wr1jyFWa kFWqyryfAr13GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbzkFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCF04k20xvY0x0EwIxG rwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4 vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IY x2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26c xKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7Cj xVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUywZ7UUUUU= X-Originating-IP: [124.16.138.126] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the potential failure of the clk_enable(), it should be better to check it and return error if fails. Fixes: bbce5802afc5 ("davinci: mmc: updates to suspend/resume implementation") Signed-off-by: Jiasheng Jiang --- drivers/mmc/host/davinci_mmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 2a757c88f9d2..80de660027d8 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1375,8 +1375,12 @@ static int davinci_mmcsd_suspend(struct device *dev) static int davinci_mmcsd_resume(struct device *dev) { struct mmc_davinci_host *host = dev_get_drvdata(dev); + int ret; + + ret = clk_enable(host->clk); + if (ret) + return ret; - clk_enable(host->clk); mmc_davinci_reset_ctrl(host, 0); return 0; -- 2.25.1