Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbdLEKCq (ORCPT ); Tue, 5 Dec 2017 05:02:46 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:40691 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752773AbdLEKCn (ORCPT ); Tue, 5 Dec 2017 05:02:43 -0500 X-Google-Smtp-Source: AGs4zMb+tsJvH5OeDuSfp7FXYXUc989s6yyNC6TtZAz/KJqrhTkwTBHywvQJGUo5l0hgO/iwSZ3pBw== Subject: Re: [PATCH 0/7 v2] net: Fix platform_get_irq's error checking To: Sergei Shtylyov , wg@grandegger.com, mkl@pengutronix.de, michal.simek@xilinx.com, opendmb@gmail.com, f.fainelli@gmail.com, davem@davemloft.net References: <1512409703-20881-1-git-send-email-arvind.yadav.cs@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org From: Arvind Yadav Message-ID: <3acd99d9-5837-eac4-0125-ae77e1369fbf@gmail.com> Date: Tue, 5 Dec 2017 15:32:15 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 762 Lines: 26 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