Received: by 10.223.164.202 with SMTP id h10csp1303960wrb; Fri, 17 Nov 2017 18:34:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMZHQzF6AEjY3JuRo0xO+7l4hO8ONJEk5reM4AsDzH+Dj9MvdhkO35n7OJc3STNOA/rgvilF X-Received: by 10.84.232.76 with SMTP id f12mr7034935pln.195.1510972448561; Fri, 17 Nov 2017 18:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510972448; cv=none; d=google.com; s=arc-20160816; b=b8NVOKxzTrcZH/2EMDO7jYqxQHsakDhKHd5pgnLMqHK/IzV0ZmIEPD84nachhL1vdv 2Gxp/45GQYnYcOI10jEIKwXwAqXt9I5Bvj8gfn1Dibkgn0qs+923OWo2Ok+6HKtYXK4c yR+BaGSIc/ILcNnSi3ctrpmhC9SAJYoiia6foBsRMduaOVjeqHB2YI6RmKPr4fSQbl2m BHoXFGNgSsZ5mhtWudo/l23BiWaTxFJv6i6U8mFSarKkgkmbKYiJKQFmXJ9uVgalPSEF V16AokCLq0IlgyEPTpfT+eLOy8j6HK7g2QWQCY6A+f9zwvLMtwQoqp/AbQeG+9UAoBZA hIOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=JC1rp6ZaRDvGUwEq+HZEzhxiqqPm2TpoKq+XS4G4yuo=; b=hDSmVmUWpJUH01VtxWWk7qCfrBFb9O1S+r99HHCZ8jfmW3M1kQuMgFzj8sOY5pFwii HtdclvBu9GtS/nvTDVmKXjHefjtji0LfudJuUR5aRr87gpFVnd0yKslY6UEa3iUCbuq1 lw+AsCrpsDueWtjdeOrzM7A314ehMGx4mpQxNmTVFzxNv04hXf6BPBFXSYrBcrYPCIRu 2GkHiD4RwAFYBKOz8qgBFbKQUkFmJR3Q/0dEiobvT/DJsAcsZj4s73Z1mLf+qqx/IFLP mtfwLmUbMJ1uy0/IwJEAr8krGWKILCBbdfTbzWel2ZebD12PInT7jryscOX9sV0NE+k5 COWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rfB2P8Sr; 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 f81si4174651pfj.30.2017.11.17.18.33.55; Fri, 17 Nov 2017 18:34:08 -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=rfB2P8Sr; 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 S1161644AbdKQTQ1 (ORCPT + 93 others); Fri, 17 Nov 2017 14:16:27 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40415 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935531AbdKQTQD (ORCPT ); Fri, 17 Nov 2017 14:16:03 -0500 Received: by mail-pf0-f194.google.com with SMTP id u70so2597236pfa.7; Fri, 17 Nov 2017 11:16:03 -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:in-reply-to:references; bh=JC1rp6ZaRDvGUwEq+HZEzhxiqqPm2TpoKq+XS4G4yuo=; b=rfB2P8Sr1X7uxkoSlFZpAxrVLFEskk+z+yW1AGOUhqxsOVOg8RwEtIhzDtRK22iTcU 5nnOyUhwxSzTi8QiIT09rCKjM9tSPEuA0IouUvt0MxJ9fIgNefoZtW9Ymfe+BUPLpOau eEmm780wQcqZX9Ph+CoQ67EyQwTP4pwh2NvjSqfGPss4X0Wm9r8JesbJ/MEidzV8p6r7 Lr0FYnLe3qA7aMenASfP5YUaJnzpBJTeqZOILbKbIPxY8kCfelgNmevKP+Ho2JXqLr/P iLHKf0Xs451a/4AqCQKSNdFLiRz7badhZDKr8ZctUekuJCMD0V0NWbiNmST8C+jLkKb5 LvUA== 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:in-reply-to :references; bh=JC1rp6ZaRDvGUwEq+HZEzhxiqqPm2TpoKq+XS4G4yuo=; b=CBzYqNzYHqmpWNcSlLGDIiek+NnUhMJmJF1tl+BVSi4xXAoOo1gait3kHi1RINcJAb KUxpkVSel+WngMY/mqBvUUifpI9fLb/G6Ht7i1nGHT+qDGs9gEg/rX9KoAzDdBw+3Bn7 JGOg5QPDPxTEG4iP0WJs6lubf4oyCEql0Y38gk5gqcd0gbEpBA5a51mLChSthToSr9My NIF9JdBLnnK9CFKx3oROBpzSz/fF1QSqWcEBDc4Uy2eNcSK2VtjmiHbvxAFQZn3RjR/w FWGG7SXKKCzKvVEvIoKljlFOSsP4Ks1iGWBsI/YaWh0GREfI7U0zBGeLfqoTLZ7FEuaZ mZ8Q== X-Gm-Message-State: AJaThX5NPVrKVnPd33FFMPvEcn/AtZfGPubu+z2UPKEVULgWvdmYJ5mM Az/0GK1FEeNbq3/bYWrRj3g= X-Received: by 10.101.65.198 with SMTP id b6mr5964342pgq.136.1510946162695; Fri, 17 Nov 2017 11:16:02 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u188sm7807441pfb.188.2017.11.17.11.15.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:16:02 -0800 (PST) From: Arvind Yadav To: dmitry.torokhov@gmail.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@roeck-us.net, wsa@the-dreams.de, daniel.thompson@linaro.org, mcuos.com@gmail.com Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 02/10] Input: omap4-keypad: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 00:45:24 +0530 Message-Id: <1510946132-13554-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510946132-13554-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510946132-13554-1-git-send-email-arvind.yadav.cs@gmail.com> 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 --- drivers/input/keyboard/omap4-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 940d38b..8a4b161 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -251,7 +251,7 @@ static int omap4_keypad_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (!irq) { + if (irq < 0) { dev_err(&pdev->dev, "no keyboard irq assigned\n"); return -EINVAL; } -- 2.7.4 From 1583407640775399255@xxx Tue Nov 07 11:46:39 +0000 2017 X-GM-THRID: 1583057850648089176 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread