Message ID | 1512409703-20881-1-git-send-email-arvind.yadav.cs@gmail.com |
---|---|
Headers | show |
Series | net: Fix platform_get_irq's error checking | expand |
On 12/4/2017 8:48 PM, Arvind Yadav wrote: > The platform_get_irq() function returns negative number if an error > occurs, Zero if No irq is found and positive number if irq gets successful. No, returning 0 is not a failure indication anymore. It used to be but not any longer... > platform_get_irq() error checking for only zero is not correct. [...] MBR, Sergei
On 12/5/2017 12:54 PM, Sergei Shtylyov wrote: >> The platform_get_irq() function returns negative number if an error >> occurs, Zero if No irq is found and positive number if irq gets successful. > > No, returning 0 is not a failure indication anymore! It used to be but not > any longer... And I fixed this function exactly to avoid overly complex error checks (which you're trying to propose here). >> platform_get_irq() error checking for only zero is not correct. > > [...] MBR, Sergei
Hi Sergei, On Tuesday 05 December 2017 03:27 PM, Sergei Shtylyov wrote: > On 12/5/2017 12:54 PM, Sergei Shtylyov wrote: > >>> The platform_get_irq() function returns negative number if an error >>> occurs, Zero if No irq is found and positive number if irq gets >>> successful. >> >> No, returning 0 is not a failure indication anymore! It used to >> be but not any longer... > > And I fixed this function exactly to avoid overly complex error > checks (which you're trying to propose here). > Thanks for your comment. yes you are right. Now It'll not return 0. It will return irq and error as negative. I will not add a check for 0. >>> platform_get_irq() error checking for only zero is not correct. >> >> [...] > > MBR, Sergei Thank you, ~arvind