Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbdLEJ5t (ORCPT ); Tue, 5 Dec 2017 04:57:49 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35830 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbdLEJ5p (ORCPT ); Tue, 5 Dec 2017 04:57:45 -0500 X-Google-Smtp-Source: AGs4zMZwweSoX6KdPQmglaXt9IFt4gL18EJuV+OvnC3XqV2VltrjTvMCDuX05r7IJRCne725moK//g== Subject: Re: [PATCH 0/7 v2] net: Fix platform_get_irq's error checking From: Sergei Shtylyov To: Arvind Yadav , wg@grandegger.com, mkl@pengutronix.de, michal.simek@xilinx.com, opendmb@gmail.com, f.fainelli@gmail.com, davem@davemloft.net Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org References: <1512409703-20881-1-git-send-email-arvind.yadav.cs@gmail.com> Message-ID: Date: Tue, 5 Dec 2017 12:57:41 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 508 Lines: 16 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