lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAfSe-sX3yx4K5WP_yT3TP7aiL-EOJinvkgL63TdUKZh3Emv1g@mail.gmail.com>
Date:   Wed, 17 Oct 2018 10:35:51 +0800
From:   Chunyan Zhang <zhang.lyra@...il.com>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Chunyan Zhang <zhang.chunyan@...aro.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-mmc@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linus.walleij@...aro.org
Subject: Re: [PATCH] mmc: sdhci: use goto rather than return directly

On Tue, 16 Oct 2018 at 16:30, Adrian Hunter <adrian.hunter@...el.com> wrote:
>
> On 16/10/18 11:19 AM, Chunyan Zhang wrote:
> > The driver should clean resources requested in the function before
> > unnormal return.
> >
> > CC: Linus Walleij <linus.walleij@...aro.org>
> > Signed-off-by: Chunyan Zhang <zhang.chunyan@...aro.org>
> > Fixes: bd9b902798ab ("mmc: sdhci: Implement an SDHCI-specific bounce buffer")
> > ---
> >  drivers/mmc/host/sdhci.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index 1b3fbd9..f6b57e1 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -3991,7 +3991,7 @@ int sdhci_setup_host(struct sdhci_host *host)
> >               /* This may alter mmc->*_blk_* parameters */
> >               ret = sdhci_allocate_bounce_buffer(host);
>
> Do we need the error return?  It seems to be zero always.

Or we don't need to check 'ret' for now, right?

>
> >               if (ret)
> > -                     return ret;
> > +                     goto unreg;
> >       }
> >
> >       return 0;
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ