[PATCH v2] gpio: sifive: Add missing check for platform_get_irq

Jiasheng Jiang jiasheng at iscas.ac.cn
Sun Jun 4 18:17:10 PDT 2023


On Sun, 4 Jun 2023 04:59:46 +0800 Andy Shevchenko wrote:
>>    224          for (i = 0; i < ngpio; i++) {
>>    225                  chip->irq_number[i] = platform_get_irq(pdev, i);
>>  > 226                  if (chip->irq_number[i] < 0)
>>    227                          return chip->irq_number[i];
> 
> So, this should be
> 
>   ret = ...
>   if (ret < 0)
>     return ret;
>   irq_number = ret;
> 
>>    228          }

I will submit a v3 to fix it.
Also, the same goes for the other patch
"gpio: ath79: Add missing check for platform_get_irq".

Thanks,
Jiasheng




More information about the linux-riscv mailing list