Received: by 10.223.164.202 with SMTP id h10csp3222347wrb; Tue, 28 Nov 2017 08:01:14 -0800 (PST) X-Google-Smtp-Source: AGs4zMZaSLIUXkIR4mWDr/DlpdrcdgZkYmR6LoUd04oPNEtJ0bONoMaT6EAR6LiJFLPjj6RyaOzZ X-Received: by 10.99.112.23 with SMTP id l23mr40292431pgc.277.1511884874140; Tue, 28 Nov 2017 08:01:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511884874; cv=none; d=google.com; s=arc-20160816; b=wWUsXpU2qrXtxO9EL/Bulk0aHCtTkUHpaf9aOjoiTh5FEMW8HlELETIYHqMO4ZKVEq HxyxvV/vedrE317C66XuY8QCl296XemcvKIMBSvEowGWGgs8vGUxck/UpTLKZNqR3V22 gSXAov/mT6g9pCivfaMJaZxxb7pYdipOGfXmNYG1TnhNh8CIrUK4yH/Y6iKrtic6tUUE 8/h4fzHGTUkM3t6vSivn+Xex/Cpu5JxG9GL7xHLczVRz1wq/xmi1QWbiFvmMHZuhWTch 7ZxyYY1xIA5Dw1ft+5ry3UeD/4mYpp14xAbJhqY71a9+ohlnNyjRxTWeEKC6D5kKsOVV RZ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=WfxZky2hXjZxtiom3fQKhtCS8k0lhd8k6n6bc7geUyU=; b=wNLhwAYDd3khSfxOi1Zf3CmoSqJ2p02nM6/+T4oxeWVwDKIHVezq8sXRcCOB9tg951 6iRXCijZCA0tkRVRSByFK5nQR9pHEyreRl9HxOtGuC4x35ypbDnKduanQxzOOq7ymuxV hCze6WjrVQ1BD0S70hSnIi2tCevJObVULzwqF5d6MPm5Cl+IONugcp9Sq6IiTTDf9FFS 0Frnq/ap3XXy2N/e9UNX5+5gSZdGrtSUMaINLV95Mo1JlG/S9tcvh1H1BUicYTCEnGyr duLQu7GG8cJNJltsGQ0rdjCDr3W6LFI/XhCotfYWEaiHGCCnYxrYrAPAIWt2Hj4xJRSo 0tkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mEZBEiCJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si24356506pgp.582.2017.11.28.08.01.00; Tue, 28 Nov 2017 08:01:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mEZBEiCJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753686AbdK1P7p (ORCPT + 77 others); Tue, 28 Nov 2017 10:59:45 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:40035 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752380AbdK1P7n (ORCPT ); Tue, 28 Nov 2017 10:59:43 -0500 Received: by mail-pl0-f66.google.com with SMTP id 1so161600pla.7; Tue, 28 Nov 2017 07:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=WfxZky2hXjZxtiom3fQKhtCS8k0lhd8k6n6bc7geUyU=; b=mEZBEiCJRWF9xS8VRZvWUv755VzUJTpLpZVpX55bQ3CdJN/DOg2KK1fYMBKUMkEnRP tAtmc4JL+BgnRx3jebdJ3otF42/EoL03VCL73mum5HJ5kgq1PAleRf/+FvGLbHi9y4bF UtvIa8hz6VNX2Sioe9bDx8dNYIrNE+zA+oKFvcLBVpK6jtdzs8kqXIxovx0IvRW+CoJq /KpO/vnK2b/HhiApoh5BA6ECLIattbEoYDlL7fLTH6gy763VGRz1QvEyYw0iDC/LFoyO e8uBAEDDZXnqOMc6u2cP7JMYLn/zUUUMELRQn+Vb00yn9sunTaTGK1vHBmh1MKJZ8TnU p2cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=WfxZky2hXjZxtiom3fQKhtCS8k0lhd8k6n6bc7geUyU=; b=QdxZKWcnM82KviylazPkknjH72RQoaN+h6H8nJfyfrNooz2neLbzXMOjgOxfmTsnO7 LiU85Sspkx24548oK+YERQ5XilPq+2bfWsQlEYgIG2d41sGD33ZKiwKRkFMu3vrqKk1H I1X0hv6m5oIHPSI5tFPO+AbS0pN0btrcolIzNvnAswzikimTv4Qabiv5SViinJ/Sx4xc /T0wmzbRWWW2mqUvlvK/2T9Gd/Fw+PElpQmkdHuzmhxqh9+acJpOP9CSbm+GC0aW1kzb R6ww5Sxj0mX8GTTKgB82VTC+cHjFsJoC6w6HTMQ34E2cxN9MGlsI6FyxnqFf8G0gLn9C YmdA== X-Gm-Message-State: AJaThX4ep7JK54viCYBo/jCsFKJBLcRx8F4Uv9TdvXrpyulEfn+rRoY9 zv+izpDYdE0XYkx3IRDXFg9cgQ== X-Received: by 10.84.172.195 with SMTP id n61mr41755918plb.78.1511884783245; Tue, 28 Nov 2017 07:59:43 -0800 (PST) Received: from [192.168.0.110] ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id m3sm49767682pgs.12.2017.11.28.07.59.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 07:59:41 -0800 (PST) Subject: Re: [PATCH 01/10 v5] Input: ep93xx_keypad: Fix platform_get_irq's error checking To: dmitry.torokhov@gmail.com, maxime.ripard@free-electrons.com, wens@csie.org, mcuos.com@gmail.com, linux@roeck-us.net, linux@armlinux.org.uk, lee.jones@linaro.org References: <49ba0386f1930f58edfd5ee0f5e65d2a02a46744.1511280261.git.arvind.yadav.cs@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: arvindY Message-ID: <5A1D87E8.3020801@gmail.com> Date: Tue, 28 Nov 2017 21:29:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <49ba0386f1930f58edfd5ee0f5e65d2a02a46744.1511280261.git.arvind.yadav.cs@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, Sorry for troubling you. I need to push others also. Please share your review comment. Thanks, On Tuesday 21 November 2017 09:41 PM, Arvind Yadav wrote: > The platform_get_irq() function returns negative if an error occurs. > zero or positive number on success. platform_get_irq() error checking > for zero is not correct. > > Signed-off-by: Arvind Yadav > --- > changes in v2 : > Return keypad->irq insted of -ENXIO. > changes in v3 : > Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. > changes in v4 : > Return -ENXIO insted of keypad->irq. Which was not correct in v3. > changes in v5 : > Remove changes of v3 and v4. go back to version v2. Which is correct. > No need to check for IRQ0 and return keypad->irq insted of -ENXIO. > > drivers/input/keyboard/ep93xx_keypad.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c > index f77b295..01788a7 100644 > --- a/drivers/input/keyboard/ep93xx_keypad.c > +++ b/drivers/input/keyboard/ep93xx_keypad.c > @@ -257,8 +257,8 @@ static int ep93xx_keypad_probe(struct platform_device *pdev) > } > > keypad->irq = platform_get_irq(pdev, 0); > - if (!keypad->irq) { > - err = -ENXIO; > + if (keypad->irq < 0) { > + err = keypad->irq; > goto failed_free; > } > From 1584692753430481451@xxx Tue Nov 21 16:12:58 +0000 2017 X-GM-THRID: 1584692753430481451 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread