[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 6 Jun 2023 10:21:21 +0800
From: Jiasheng Jiang <jiasheng@...as.ac.cn>
To: andy.shevchenko@...il.com
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, Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: Re: [PATCH v3] gpio: sifive: Add missing check for platform_get_irq
On Mon, 5 Jun 2023 17:15:53 +0800 Andy Shevchenko wrote:
> 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;
>> > + }
I will submit a new v3 adding the explanation.
Thanks,
Jiasheng
Powered by blists - more mailing lists