Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3523834pxb; Mon, 4 Apr 2022 19:51:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2w+SD6zOW6sAlmziq+pq/z6L38/SGNsUW+DyENq8wKJ+3uVjsQ+EPcRBqY1pCKD7trOQy X-Received: by 2002:a17:90b:10d:b0:1ca:bc41:c187 with SMTP id p13-20020a17090b010d00b001cabc41c187mr1564599pjz.214.1649127107810; Mon, 04 Apr 2022 19:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649127107; cv=none; d=google.com; s=arc-20160816; b=lWlVeGZ2LdAdv7FxGMzD+gekv66zq2hxjyzImMWi788kUvNVmVAErQgtkF63AJkQxp SQhsREP6htJtp7nlodKPZefdjasdMylP9NHKnV6Qigw9lOhrnmSkkpHwM3V3cehKPTJ6 fNX72kG8Sec0vMpKS2yNMXVgRAn/aOtFvjfQk6KsYAG1PVcawcRBixWOVfYprz2+wPE1 Z4oUbU1Qh05Zkr8IHFA5Nq/w5/8hzNaoQDjVyLvMkjsRxIf6n02gUO2X8xRdS/jvzlc7 TM8gqD4YnOjYJCsRASqV3PrFH6BWD47IDdJUW8XGrdlB//tcv+6SL6OHh5SidAegxgvz sXzg== 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=EOXzNn8YJXSBSPBTfEilUNoggTZ9fchh0UKh2uaYCkg=; b=JHoLAtOq73Ja/koJuYPaF+7ejaM+qLZov5fdO66+McFuAjy7rNTmbvS/hVtTkez9HI c3rACbESo4/OSDERkXX+2FBISU1PFDNBTFRxHPrktkqjgchVtdQOgqyk3CfTGA1OFX3z 2xGy8F3WSdSkZRTQbpwGzqOQW/Z//pWwDMgA2mDi5uM/Tf6PRd8p4XgBgE/GKJ1vitkE 88eLkT/gffVARadOZbGLmRKD2+kgy1I1snip8wWRXRkfiL5vEZfoiDaAbAvxseFNbWCq PW1rn/WorC2d6FrZxpB4Vnmxln0AfvKTCFVyQwybT4QS232ttWsHUxq8BrKRBnMKVSJn CGPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kAwacWRl; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r7-20020a635147000000b003864fd74329si12013681pgl.80.2022.04.04.19.51.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:51:47 -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=@gmail.com header.s=20210112 header.b=kAwacWRl; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3E6601667FD; Mon, 4 Apr 2022 18:15:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381216AbiDDWIF (ORCPT + 99 others); Mon, 4 Apr 2022 18:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379815AbiDDSKn (ORCPT ); Mon, 4 Apr 2022 14:10:43 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED3B263C8; Mon, 4 Apr 2022 11:08:45 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-2eb46d33db9so56222287b3.12; Mon, 04 Apr 2022 11:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EOXzNn8YJXSBSPBTfEilUNoggTZ9fchh0UKh2uaYCkg=; b=kAwacWRlbua9Upr4P4y0HifVnz+enwieMp9UuW7TasoWWdBMX2U1ohTaSBrWezI3J4 n8Y4/cnYmT1N5OVNnylsiVtO6xKHI0MRuTuJS1fgouuJ8TeX+ppvsGKAlvAyRLmkJJBg ikjG+PwSNdCzzWi8FuMpWlnjrJQqZwsLh19qWQh2Xuex9MvgE4RIICVNs/JpWawpigvy HLW0LKiUj7j8CdpRNQdOmvXk1DXFGpZvgZHNB7aKQxfGq643HieiLatKxO0S0EHIgK9E ApgQB6v2DcSfa0DJqSPnvW8XZE/CJP/ykJcn89IfSqAMBeb0T690o7Nx9p6lUGpZM4d5 z81w== 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=EOXzNn8YJXSBSPBTfEilUNoggTZ9fchh0UKh2uaYCkg=; b=G2C0nKfLgbw7gwcL+90Q/aVsOfWDic1DYBhmWxXd2aMKyd1GgnbQXpu4XGeMdVVsJd u94gZl/6dK1EWxPHtqfvPBmzDS1cspsE34s935HSd+M72G9l4gTzPVcDWLH5KpKfsCUo gLb2ndG4QtPcF/lmiJBoZLqe1rFBEBmlKfHPt7OFADKah2ykFHENbJ6rNlAVb6Wv8K6b fYBIDOcsH6deBOmKmFPYfnG+9zDaBJ3f1uZJLEbBICYJnm33weHEr19YM1l0o7wLluDo q49TWCY5VnhvvGnlkDnx2MCYy/+2VrbdWWIebKS0hdKSc//4FInzXEklrjGQIZjdNghd 6FIg== X-Gm-Message-State: AOAM53053lOXLSO8DoVoTvgGAWa7dUzgK7MXIt/es2BGOripESEsqVx0 3FgkoM0rQzPfojybpUIn+JMn/+tAsCef8I3SXXo= X-Received: by 2002:a0d:e212:0:b0:2eb:4f2b:6e91 with SMTP id l18-20020a0de212000000b002eb4f2b6e91mr1221175ywe.78.1649095724281; Mon, 04 Apr 2022 11:08:44 -0700 (PDT) MIME-Version: 1.0 References: <20220404172322.32578-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220404172322.32578-2-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Mon, 4 Apr 2022 19:08:18 +0100 Message-ID: Subject: Re: [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of returning directly To: Biju Das , Wolfram Sang Cc: Prabhakar Mahadev Lad , Ulf Hansson , Philipp Zabel , Yoshihiro Shimoda , "linux-mmc@vger.kernel.org" , Pavel Machek , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 Hi Biju, Thank you for the review. On Mon, Apr 4, 2022 at 7:02 PM Biju Das wrote: > > Hi Prabhakar and Pavel, > > Thanks for the patch. > > > Subject: [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of > > returning directly > > > > Jump to error path "edisclk" instead of returning directly in case of > > devm_reset_control_get_optional_exclusive() failure. > > > > Fixes: b4d86f37eacb7 ("mmc: renesas_sdhi: do hard reset if possible") > > Reported-by: Pavel Machek > > Signed-off-by: Lad Prabhakar > > --- > > drivers/mmc/host/renesas_sdhi_core.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/mmc/host/renesas_sdhi_core.c > > b/drivers/mmc/host/renesas_sdhi_core.c > > index 2797a9c0f17d..cddb0185f5fb 100644 > > --- a/drivers/mmc/host/renesas_sdhi_core.c > > +++ b/drivers/mmc/host/renesas_sdhi_core.c > > @@ -1033,8 +1033,10 @@ int renesas_sdhi_probe(struct platform_device > > *pdev, > > goto efree; > > > > priv->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, > > NULL); > > - if (IS_ERR(priv->rstc)) > > - return PTR_ERR(priv->rstc); > > + if (IS_ERR(priv->rstc)) { > > + ret = PTR_ERR(priv->rstc); > > + goto edisclk; > > + } > > Why can't devm_reset_control_get_optional_exclusive to be moved up before devm_clk_get? > In that case we will have to jump to the "efree" label Or if you don't want goto at all this can be moved to the very beginning of the probe. Wolfram, what is your preference on the above? Cheers, Prabhakar