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: <CAHp75VcO2LRFyZV0nsmMsPRHByStyQ5AzeWSM9S99Qh60=UHvQ@mail.gmail.com>
Date:   Mon, 5 Jun 2023 12:15:53 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc:     oe-kbuild-all@...ts.linux.dev, linus.walleij@...aro.org,
        brgl@...ev.pl, palmer@...belt.com, paul.walmsley@...ive.com,
        linux-gpio@...r.kernel.org, linux-riscv@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] gpio: sifive: Add missing check for platform_get_irq

On Mon, Jun 5, 2023 at 12:13 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Mon, Jun 5, 2023 at 4:49 AM Jiasheng Jiang <jiasheng@...as.ac.cn> wrote:
> >
> > Add the missing check for platform_get_irq() and return error code
> > if it fails.
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>

Actually, the change is functional and now the wrong IRQ numbering in
the DT will fail the ->probe(). This needs an additional explanation
in the commit message why it's not a problem.

> > -       for (i = 0; i < ngpio; i++)
> > -               chip->irq_number[i] = platform_get_irq(pdev, i);
> > +       for (i = 0; i < ngpio; i++) {
> > +               ret = platform_get_irq(pdev, i);
> > +               if (ret < 0)
> > +                       return ret;
> > +               chip->irq_number[i] = ret;
> > +       }

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ