Received: by 10.223.164.202 with SMTP id h10csp2352217wrb; Sat, 18 Nov 2017 20:00:40 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ8LciTbryYz5upMsEAT7DSTcQgnCTmTw24q3cCxRWChFMDqiU3E+ZER9Mj9ZTogTOpWrVP X-Received: by 10.84.225.19 with SMTP id t19mr10057356plj.223.1511064039981; Sat, 18 Nov 2017 20:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511064039; cv=none; d=google.com; s=arc-20160816; b=UFTIjOFL0UFL0otq5bLOAizIXEeW5Dxeh2pGMNYppwIVrDYeyrXmEZQl/3gwh8hdeY 0VhC0YinzhY5PpbvZFGmWD0CPl71xX7clZ205OVN00h5f9TVt7x153ILDbYdiJLssPMF jgKxd3H+w//qd0n+KGAAN5xfzTpzsEToJMpBjBboJwmQScTkVrEfQiGQr7DnmLDCd2oq /g7aq81WM5NQRz6AIZOL2rUQGarxrfNzXTV+ciOs9/TG1w+BBoAF1/xQP0iO7Ls69Nuj 5yWBKAgQkcF13hSF5cwTG1CfCfNvFd4nJSAzS8E+DJd+uxPtGbbWQHmVBWBp4c4h/dMj NMBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=L4Y1mh5hm93zkNk7euE3sw6P5LznSgBX17hY+3fEni4=; b=Fb961qM9lCMQmLyW29pXqn25UHRM7ymnGZfV6hm5pjhGTrQVjmm0H/4t6d16phU2yS mYJUeleuuO7co2xP/gemir/Sv+rkCiOk+GEqVwWV1Jve/V3nT4fv8YGZeqY9GIfra5wL 2OE8Gk3uZ85iWUuZ9IOgrrAF5ntQy4htdeOeZo7n18EZQ7rxsx+EUmi57rB1arMRo9R4 9ikhtw953RQ77BDBqjooUX48haxNehBpc1ijI4N18zt12G+wYG0YgiFC32uppJ4RFaKw +t4KYQaWmDe8wbua1ALGrP/ichXOEGhVRSap/EU5hnZfN/+B2fcaPr2HKpOLd06vMrEU MfJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pCsdC+46; 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 n1si5414561pge.496.2017.11.18.20.00.27; Sat, 18 Nov 2017 20:00:39 -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=pCsdC+46; 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 S1424030AbdKRKzh (ORCPT + 93 others); Sat, 18 Nov 2017 05:55:37 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:43865 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422776AbdKRKz3 (ORCPT ); Sat, 18 Nov 2017 05:55:29 -0500 Received: by mail-pg0-f68.google.com with SMTP id r12so3834523pgu.10; Sat, 18 Nov 2017 02:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=L4Y1mh5hm93zkNk7euE3sw6P5LznSgBX17hY+3fEni4=; b=pCsdC+46/wi0GwvMDYKT9FcCmERWy7pFhhB342il0VvGvsFXUxXQy4Fgkf5gfGKwur PHwoSpjc22KQQbkLqdWXTegZ+wdkfyc7rBqZ2juDvmc89vA2sStmt7FTil4bv3Wz+Xdr ZAjtYrHme1jw4NOje2qF40sZIc1RuHKeOCKLVvTDkBK/kAa55QO+mstheif+dYRJeiFe Z2ht1uXbBdQx8dxuhEuIxO5aF8Y1cF02kaovAjuaRiXdBoh77ia8TO0s2f7qoelpq7BU /+CNSA/KkzF4SfkRHIdslPWfLIIS8Vz/Lbh1yyC9o1zSjFYSDVC++bxAfHFuHP5FKTbw 2y1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=L4Y1mh5hm93zkNk7euE3sw6P5LznSgBX17hY+3fEni4=; b=QR3YaxG0Rcnaki3nfrWO1tG/meXLA1dsKWslpRYeBFe3Hl2IouexY3fDfrxxK4aIhN VcsfXPzEmh1cKgiXgnTH8WkIzx6mn5ic0xu85otnUDe1Iq4bwe0zdd8MbfBBqQ702iPn SwXFaQ7CobQmYjwuYPaIGDvMfWbqdpiAnlkFny/pRzEhmIf6YOv7N1cBho+Mbk+a87DA NUS2Vx2QNbQZs7tjRWDBTr33bAJEoXOxyRbi+Wqkur4abns7TflxLtcmHObm7/+WP3NF UzfFCWyLWuvmcE4xrm5IXGrSU6kI7/nX5zbN/ks33Y3Ag9FAO+ZzH+8704pTk+MsB3I0 cjQg== X-Gm-Message-State: AJaThX7mNJhdnBNZVo7M2X9+hqsRed3hd38REpE7SRf+/NGwdPb886hA 4+MaNtLjtDgO/KeGCc+Hj1o= X-Received: by 10.159.197.67 with SMTP id d3mr8064866plo.409.1511002529368; Sat, 18 Nov 2017 02:55:29 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id g7sm12321513pfj.13.2017.11.18.02.55.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 02:55:27 -0800 (PST) From: Arvind Yadav 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 Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/10 v3] Input: ep93xx_keypad: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 16:25:08 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; goto failed_free; } -- 2.7.4 From 1586258716916079661@xxx Fri Dec 08 23:03:17 +0000 2017 X-GM-THRID: 1584360675204398715 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread