Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp949284pxb; Wed, 6 Apr 2022 05:06:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxw/CCUmxzcgu7Ij/HrpBEkIr32G+379xQFbTGAp966kAfpOuo35MPa+yzJ3JBj1Iom2KB X-Received: by 2002:a02:93ca:0:b0:319:fca7:7364 with SMTP id z68-20020a0293ca000000b00319fca77364mr4334680jah.182.1649246816416; Wed, 06 Apr 2022 05:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649246816; cv=none; d=google.com; s=arc-20160816; b=JHCi6CAN70LPurA8XA1fNqHILDCEvKP7xGYYN0ZU6me7eSEKdJmin1d1HEUgvBvCbL RJ0CLkp2rnD+RNj0hk0kUJgzNpC9+ShQTtYtRZ2LcwinZua0TC/lmI07mVq5BDf1/a+8 fwW7WurmeerN5cSp1pvjDvum75Xr51qjdArMcwZZ9wYKCyAtYBGTe9eLSsOk90WJtFal fbzhRXNYu5tEZFoUFC8/JwKO8nt9DtzpWKK1tmQvVYlEGQpIuxhW2LruAwyHH5bYdEj6 NPpol/dahmdXZEKVa6bTT0r7vdOUJDA97X+22jytbeZEkioUsp3xuWFNZgAiUhlExk3u 8QDg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sMyv3WWDpjf/CLxQ/zIx0RsK6HRLNnfkzf6HbkcrVr8=; b=BxIlTLzKOgMKbBr+NsP3rkV64J182RhPRGdaCj4WOWT4VTsvfibGDTLOTWVv4o/gxQ Zk3ZBVSHDtYwdxQS21slaHbXI0oTTf0UNDvxYEpkyMgg/YQW1AqKC02sQQMF+VkcgOtU 3VetWBu8HOs8zUVAHi5tNE2x22+EB/NwrRKXSv117zvI3Yl3X8vML8ehVAliaL0X3O+O mVAz2nN8hC4RFmLXenvy0q6lbK5ols7iYS5BiohcfCotXDEremsNWLEkk5xs26t5v8yL NdewopH0Wkeb6JnPAbfAHzuflzl0CYaDKZgtccea9kPTn6+qU9B5ss02BsZTcoAMUopF pONg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aSjG8vGq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d18-20020a056602281200b006495808452fsi7802903ioe.76.2022.04.06.05.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:06:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aSjG8vGq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABA56689588; Wed, 6 Apr 2022 03:37:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1838299AbiDFAvF (ORCPT + 99 others); Tue, 5 Apr 2022 20:51:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348585AbiDEJsf (ORCPT ); Tue, 5 Apr 2022 05:48:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF486FF54; Tue, 5 Apr 2022 02:35:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B3033B81C6F; Tue, 5 Apr 2022 09:35:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 096BDC385A3; Tue, 5 Apr 2022 09:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151311; bh=9xEAKMpxGzf2culwYA+lPprUuDTBQpTKmsGMIu0d/v0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aSjG8vGqEa+Oth5WYJv7kNlBFgJOVW0k4Q472L3ZSpI4JlMh5wNYRPePxhKSVlNZZ 7cM8qrxlLXAXVR4OD8nns2AIu5BDgvbf7Cq4Sk0DA5jU7wKAf3kab31xdntk2DQFFV KEV+brqEf12XvIBJDXM86BmSOmcVdauSv3b72gVg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiasheng Jiang , Ulf Hansson , Sasha Levin Subject: [PATCH 5.15 367/913] mmc: davinci_mmc: Handle error for clk_enable Date: Tue, 5 Apr 2022 09:23:49 +0200 Message-Id: <20220405070350.847445805@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 From: Jiasheng Jiang [ Upstream commit 09e7af76db02c74f2a339b3cb2d95460fa2ddbe4 ] 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 Link: https://lore.kernel.org/r/20220308071415.1093393-1-jiasheng@iscas.ac.cn Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- 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.34.1