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] [day] [month] [year] [list]
Message-ID: <CAMuHMdVXeRo49Xk3_DyU2TXhkyhiAV2Wiyc22LP8udJS5=zZ9w@mail.gmail.com>
Date:   Wed, 20 Nov 2019 15:45:09 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Philipp Zabel <p.zabel@...gutronix.de>
Cc:     Geert Uytterhoeven <geert+renesas@...der.be>,
        Vivek Gautam <vivek.gautam@...eaurora.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] reset: Do not register resource data for missing resets

Hi Philipp,

On Wed, Nov 20, 2019 at 3:43 PM Philipp Zabel <p.zabel@...gutronix.de> wrote:
> On Wed, 2019-11-20 at 15:26 +0100, Geert Uytterhoeven wrote:
> > When an optional reset is not present, __devm_reset_control_get() and
> > devm_reset_control_array_get() still register resource data to release
> > the non-existing reset on cleanup, which is futile.
> >
> > Fix this by skipping NULL reset control pointers.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> > ---
> >  drivers/reset/core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> > index ca1d49146f611435..55245f485b3819da 100644
> > --- a/drivers/reset/core.c
> > +++ b/drivers/reset/core.c
> > @@ -787,7 +787,7 @@ struct reset_control *__devm_reset_control_get(struct device *dev,
> >               return ERR_PTR(-ENOMEM);
> >
> >       rstc = __reset_control_get(dev, id, index, shared, optional, acquired);
> > -     if (!IS_ERR(rstc)) {
> > +     if (rstc && !IS_ERR(rstc)) {
>
> Could you change this to use IS_ERR_OR_NULL, both here and below?

Sure. Silly me...
Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ