Re: [PATCH] gpio: ath79: Add missing check for platform_get_irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thu, Jun 02, 2023 at 09:32:00 +0800, Andy Shevchenko wrote:
> Thu, Jun 01, 2023 at 04:51:32PM +0800, Jiasheng Jiang kirjoitti:
>> Add the missing check for platform_get_irq and return error
>> if it fails.
> 
>>  		girq->parents[0] = platform_get_irq(pdev, 0);
>> +		if (girq->parents[0] < 0)
>> +			return -ENODEV;
> 
> Can you elaborate why error code has to be shadowed (overriden)?

You are right.
Returning the error code is better.
I will submit a v2.
The same goes for the other patch
"gpio: sifive: Add missing check for platform_get_irq".

Thanks,
Jiasheng




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux