From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH] gpio-tz1090: fix error handling of irq_of_parse_and_map Date: Fri, 14 Nov 2014 16:44:06 -0800 Message-ID: <4324315.2x5Mj9E2n5@dtor-glaptop> References: <20141114213256.GA24709@dtor-ws> <20141114235307.GF1739@jhogan-linux.le.imgtec.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from mail-ie0-f172.google.com ([209.85.223.172]:49438 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbaKOAoI (ORCPT ); Fri, 14 Nov 2014 19:44:08 -0500 Received: by mail-ie0-f172.google.com with SMTP id ar1so4275630iec.31 for ; Fri, 14 Nov 2014 16:44:07 -0800 (PST) In-Reply-To: <20141114235307.GF1739@jhogan-linux.le.imgtec.org> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: James Hogan Cc: Linus Walleij , Alexandre Courbot , Wolfram Sang , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org On Friday, November 14, 2014 11:53:07 PM James Hogan wrote: > On Fri, Nov 14, 2014 at 01:32:56PM -0800, Dmitry Torokhov wrote: > > irq_of_parse_and_map() returns 0 on error, so testing for negative > > result never works. > > > > Signed-off-by: Dmitry Torokhov > > Good catch, thanks! > > Acked-by: James Hogan > > A quick coccinelle script shows up numerous other cases of this error > around the kernel tree too... Yeah, I sent out a few patches today. Thanks, Dmitry