mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Pavel Machek <pavel@denx.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of returning directly
Date: Mon, 4 Apr 2022 18:12:45 +0000	[thread overview]
Message-ID: <OS0PR01MB5922C35E8C5259C3DA2A951A86E59@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CA+V-a8tdkw8-dUfrFG9kZizok8OQdcGHitAdb4E2tsBW3Xrh-g@mail.gmail.com>

Hi Prabhkar,

> Subject: Re: [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of
> returning directly
> 
> Hi Biju,
> 
> Thank you for the review.
> 
> On Mon, Apr 4, 2022 at 7:02 PM Biju Das <biju.das.jz@bp.renesas.com>
> 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 <pavel@denx.de>
> > > Signed-off-by: Lad Prabhakar
> > > <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > ---
> > >  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.

I guess it has to move up, first get reset handle and clock handle and return error
directly in case of error, Then do clk/reset ops. 

> 
> Wolfram, what is your preference on the above?
> 
> Cheers,
> Prabhakar

  reply	other threads:[~2022-04-04 21:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 17:23 [PATCH 0/2] mmc: renesas: Trivial fixes Lad Prabhakar
2022-04-04 17:23 ` [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of returning directly Lad Prabhakar
2022-04-04 18:02   ` Biju Das
2022-04-04 18:08     ` Lad, Prabhakar
2022-04-04 18:12       ` Biju Das [this message]
2022-04-05  3:51         ` Lad, Prabhakar
2022-04-07  7:13         ` Wolfram Sang
2022-04-04 17:23 ` [PATCH 2/2] mmc: renesas_internal_dmac: Fix typo's Lad Prabhakar
2022-04-04 18:21   ` Wolfram Sang
2022-04-05  3:50     ` Lad, Prabhakar
2022-04-05  4:45       ` Wolfram Sang
2022-04-05  5:13         ` Lad, Prabhakar
2022-04-05  7:18         ` Geert Uytterhoeven
2022-06-21 13:35 ` [PATCH 0/2] mmc: renesas: Trivial fixes Wolfram Sang
2022-06-21 14:03   ` Lad, Prabhakar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OS0PR01MB5922C35E8C5259C3DA2A951A86E59@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pavel@denx.de \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®