lkml.org 
[lkml]   [2021]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] thermal: rcar_thermal: Use platform_get_irq_optional() to get the interrupt
From
Date
On 20/12/2021 15:26, Geert Uytterhoeven wrote:

[ ... ]

>>
>> if (irq == -ENXIO)
>> continue;
>>
>> if (irq <= 0)
>> goto out;
>>
>>
>> Did I miss your point ?
>
> I think so, as I don't see your point, neither ;-)
>
> I meant (a) there is no need to continue the loop when there are no
> more interrupts present, and (b) irq == 0 cannot happen, so the cod
> can be simplified to:
>
> if (irq == -ENXIO)
> break;
> if (irq < 0) {
> ret = irq;
> goto out_unregister;
> }
>

Makes sense for me now, thanks :)




--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2021-12-20 15:29    [W:0.042 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site