Received: by 10.223.164.202 with SMTP id h10csp4007724wrb; Mon, 20 Nov 2017 08:25:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMYXRsSe9EsshDMro0udWQ69xr7gmaaMuWUbOHxfTMslJuyceZlEC4II1bAvwcL/OT2gHMiZ X-Received: by 10.84.235.129 with SMTP id p1mr10567995plk.288.1511195138462; Mon, 20 Nov 2017 08:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511195138; cv=none; d=google.com; s=arc-20160816; b=lKYFH07bQUKXR1UakRg9Mh4P5Ge9RJu3flUHYtG3pIKdMKFrSo1YlqboGP3l1NRvBa jYOB7K1YqTYXlW1AxfiMf1zGwUNuaLuPfj6F+orqT+YViC8QhmIrBi4SDY0Tv3GmZION 5tIKvPtCAAsjFqMpzRzQUgu9moiwB7D1I011HORGZqvU9hOyKVS+1P0qobhSRKBmQUwj Wu8MVwKF2BxYD99UBrn+L6q+NPfElunI1hAdPiRQEMB1/1CqFY7MMcVCoI8qgxxCfaXi eHmXRK1tHdRvAyQtVUSfIAkxmH1jfyLRAVF9GHMmj+A13F4CUAVJZX6ZgJS6R7n9QAgX tWYQ== 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=jiY5q6dqwzjinohNSMFX7SNnudNVrq2xJgdtZ/8182M=; b=GAYPgS6tZkjXRIqs42+DCv5NkQE2F8Md+e7a2WY/UDEINYry9qc9yd4DhfvrkFkNd0 Svy2LmaFLJ+/5DNiXeeD561rgq9aSjluO+IjD4BF+BMavdA76D5eff/uU+m/hwnTAVXK hOkzWVpmh7WjuKVmx8SA3Z0Ns5eNjXg8b9bL7f0lYh8S775wXQeEuQ+oIaN+Ko51M0P/ 4Wp9aubV+t1mIDrxFoRCFH7fynK9+HCyDUhzZaJZbZC1n6Nl8T19W9qteZG/7cwjMEVA t2MJO0C1bCEDTfApWktdyuWGegXOU6s6PPRM90B9hwx8KCdCR/WEO2nFYT4as/zQcP4V ecSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UJR8nZTp; 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 l14si9578223pfb.159.2017.11.20.08.25.28; Mon, 20 Nov 2017 08:25:38 -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=UJR8nZTp; 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 S1751721AbdKTQYu (ORCPT + 66 others); Mon, 20 Nov 2017 11:24:50 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:39936 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbdKTQYs (ORCPT ); Mon, 20 Nov 2017 11:24:48 -0500 Received: by mail-pf0-f194.google.com with SMTP id u70so7634017pfa.7; Mon, 20 Nov 2017 08:24:48 -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=jiY5q6dqwzjinohNSMFX7SNnudNVrq2xJgdtZ/8182M=; b=UJR8nZTpOOJJQJja0d+7l2HcytXGhvEbBndMBXWPJisJdbXU/zrVvDWv7ru5n2OJMp 0tK2VMwKdb1NtSkNmTLh2jyXJpTjbp7FOP+vDfpV0odeBjZB8vGtwUR+6X8pKWz1XmDz VovjFt6I2eI/T/BkcCg2TKlLjKaFiRaMIgHktmp1/ClCwHbK9LPRFvufs3m3Wf6OjxYM IEvQwLCM0S0nA6GqqPHdESqTjwJRwNeb3icehaXpsTQoaJB8cv9jZWMg2asiixvM153v W9S+Y6Ui9XhQje9hPecYI4ZkuOPRcZrnQ8DoPFv33ZMucYJdTbIDlBV7DpThoKA1POBP iAXw== 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=jiY5q6dqwzjinohNSMFX7SNnudNVrq2xJgdtZ/8182M=; b=MScNLsuPKMbwpmBvNJDTN3xYQkx3r8PmmLxJlTvcvEEyGKTen9POtfCLt0IMobK5JA IYkBdqPIeEg3CTF4pLW48qEJbaJpVkylBGrk1xWI5fzbbDQ+MlCkDleCAL8Sj8bKLBVX XdMVE3gueocjyzJr2tKnpF5T6Rp3qzma/QM07WhSYco7GG2Ws2ynEGwe6cO3kExQhXxo Q5I3QE+zM9mkNcOi0dzUveL+Q00Jm7QHk0XrQoWdop1ux1IAj3jE1Zha3lcXOyJe5NgE XrYt9ROKXfo9/MhewxVhdGQOXC9ROQPknBbh4H88vMZvTVGhP/t6Xnkp08GAA+l86+kV eF2w== X-Gm-Message-State: AJaThX75dhG7LmHS5xG+LlL8JQVckyJhv47xIECaZIADKhO3HJtD6Mwg l4EgAcFUwJwTFTzqw3r8LgA= X-Received: by 10.99.95.12 with SMTP id t12mr3054579pgb.40.1511195088239; Mon, 20 Nov 2017 08:24:48 -0800 (PST) Received: from [192.168.0.100] ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id y5sm21196214pfk.3.2017.11.20.08.24.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 08:24:46 -0800 (PST) Subject: Re: [PATCH 01/10 v3] Input: ep93xx_keypad: Fix platform_get_irq's error checking To: Dmitry Torokhov References: <20171118183029.zooxomhrejzatuvd@dtor-ws> Cc: maxime.ripard@free-electrons.com, wens@csie.org, mcuos.com@gmail.com, linux@roeck-us.net, linux@armlinux.org.uk, lee.jones@linaro.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: arvindY Message-ID: <5A1301CA.7070407@gmail.com> Date: Mon, 20 Nov 2017 21:54:42 +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: <20171118183029.zooxomhrejzatuvd@dtor-ws> 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, On Sunday 19 November 2017 12:00 AM, Dmitry Torokhov wrote: > On Sat, Nov 18, 2017 at 04:25:08PM +0530, 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. >> >> 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; > Argh, so what will happen if you return with keypad->irq == 0? Can you > please stop and consider what exactly you are doing before churning > patches like crazy? Sorry for troubling you, I am sending updated patch of this( version - v4). If you are ok with v4. Then I will send other patch. Thanks, >> goto failed_free; >> } >> >> -- >> 2.7.4 >> > Thanks. > From 1584466631764296109@xxx Sun Nov 19 04:18:51 +0000 2017 X-GM-THRID: 1584465486576996231 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread