Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp952864pxp; Wed, 16 Mar 2022 22:28:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeFrYL/zjnVrYO16UeKLwgAs2w4WiPIPAlvLFIMEafB/VX0K7JdCbtEibf7pdx62FBjylF X-Received: by 2002:a17:90a:7147:b0:1bd:24ac:13bd with SMTP id g7-20020a17090a714700b001bd24ac13bdmr13985931pjs.70.1647494893043; Wed, 16 Mar 2022 22:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647494893; cv=none; d=google.com; s=arc-20160816; b=PfFCvrUnN4Ldbcdu8xAAlM4n0oT/comBCCymbgXYvXowdY4YsiZ7Koty8PQ9Nb0hrY GkeUSd5dynLEnjNSrEL5xO0bqrs2yzOEXDDLaZA3DhtUlW2RvAkZG6uYCCKQsS3NOuwu LJ2KLRjre7tsy0nR9l7urnpCUq9Z49HkrAz5QLfNEm06G1CWU+8vEa1mb2PyY/xq3PP0 slRdj1roySxBfC2GLUDUGy31RJte8rHa34ZnCbxR1Q6emxwaseLBxXfHNnFFayr7V/H0 GuKZhrSqWoEZeWnmIz6DGf73pzgPx4V8aREElQlPsSUD6KtUsl/Rl3K0ad/NHTLlf3GM PgfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cPnb1ATRmSI8xZX+veYE4aEfgSHzzxZV5zRVXcuyhkU=; b=0td3qbY84rITKG5YkESWSMNmctmJBI+0tODASxToLflmcbn+U9p/Cw2qugENNxYvbL eO8JI0LCmjygVVaWF5XvCZgFjofs2U5Fz0mh4pT9Y/wsdwRA9IEWgY6mRLKPUUgMVFYJ iYuQEXzr6b943ZNzg5gvu7LRq6GAkDYuZwZt16OVb/8Wbw7i1RtSqkhkHY7683N0wUcL 9HmEmpNhUsNUajGk2sl6Y4NsexZrnJFpeoqySZrMv8Zgk1F4QPCF+io5koHxc/KM3kBt FMqKNfAM0wQtDkC/IttKH/iAdqoS91k3hVDO97tHtm+rS68FsIFU3O7dhxAbO+KOZiFO bJUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MyzIMcUT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r13-20020a17090a4dcd00b001bd14e03042si1396282pjl.26.2022.03.16.22.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:28:13 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=MyzIMcUT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F340D224521; Wed, 16 Mar 2022 21:29:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348217AbiCOMYw (ORCPT + 99 others); Tue, 15 Mar 2022 08:24:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348204AbiCOMYq (ORCPT ); Tue, 15 Mar 2022 08:24:46 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A23EA63CE for ; Tue, 15 Mar 2022 05:23:31 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id s25so26214104lji.5 for ; Tue, 15 Mar 2022 05:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cPnb1ATRmSI8xZX+veYE4aEfgSHzzxZV5zRVXcuyhkU=; b=MyzIMcUTwXxiaAMPib2hzET3b2cxFOda5RQjUnVvckRXHSqJouuvENc6OiZeEO3ztp HA9qUIM8jD4siqP0DvJW4clgq3NdrqWdX2g3rNEP4SAfZwQNf3Ijx5z/DA8wXLdArYXx OZfmRzA3CBNjxBzdCxoI0U12ok4oTTMCAlyxjqFXCCsvPhtJCDO7rO0zPyuepsqppvZx UJVuHW1nXQLNX67ohVhl1lYk4pm6P9/9z3wU1MTHEN5tBPstKXAGSbqpPtxaLMLvjiV6 FGq8rAwXOZixu40ziJoyXF23TFGmu/feAktE2VO+dQ14wkxPGuPl0LILRZkXBbYUdlEW OkwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cPnb1ATRmSI8xZX+veYE4aEfgSHzzxZV5zRVXcuyhkU=; b=s+xMl383SnsOnzMOTf/vwMYGnBUizo2Xnl/IKbohc2Iv487ZWwW/i4KPYlCD3doGTp e2Vp08shX6SGaH6c00ocKteamlmgE36T2nzw4bbyV5NjxqD3zGY5P3nu/L1O/KBYD1zc vpimP/flBY+93pY4wCJ+1tZgBqpMcsUtpQRr3J9C5UINPFhiuzNBVWl3fbUMYUHl2GT4 AW4Y1EtwX3Uu/eFLPF292WYi49vJdm0sI9YL/QTpoc3gI+Bai3X7KwzLOvWr/aaHJbEW GNOznj/f5D/kFZHlZv1HfNx2k2SiR63Yn5yIjsv4R06jULdQ75UaIJNY8PmLZhSBsyqM Yjuw== X-Gm-Message-State: AOAM532gl4amuveSMhMUE6W4yfDsyImVFf7v7U6og4rVOaTpHJh1OQnE RVeCNwoLQKJM9re6FHfZuYF2f1puUqRMNkT+YRir8Q== X-Received: by 2002:a2e:8603:0:b0:246:24c:b79c with SMTP id a3-20020a2e8603000000b00246024cb79cmr17459702lji.367.1647347009946; Tue, 15 Mar 2022 05:23:29 -0700 (PDT) MIME-Version: 1.0 References: <20220308071415.1093393-1-jiasheng@iscas.ac.cn> In-Reply-To: <20220308071415.1093393-1-jiasheng@iscas.ac.cn> From: Ulf Hansson Date: Tue, 15 Mar 2022 13:22:53 +0100 Message-ID: Subject: Re: [PATCH] mmc: davinci_mmc: Handle error for clk_enable To: Jiasheng Jiang Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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 On Tue, 8 Mar 2022 at 08:14, Jiasheng Jiang wrote: > > 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 Applied for next, thanks! Kind regards Uffe > --- > 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 >