Received: by 10.223.164.202 with SMTP id h10csp4009893wrb; Mon, 20 Nov 2017 08:27:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMZptXzYncnEO7yRFSNpAgWqgPsm9/froDoV9Aje6GruI59Xsxp0lquhJxyoDujrM4wVYZO4 X-Received: by 10.98.147.28 with SMTP id b28mr11798384pfe.5.1511195264341; Mon, 20 Nov 2017 08:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511195264; cv=none; d=google.com; s=arc-20160816; b=OTDUfFITBy4i7IwpilBJKgtfNN71gZ1eLHeEuh81IRRpgdJXcMPf8XRBXMVN0hEJge cVUQAWUhGIy5VldtgKY0Xw1ejQDVvuaYJgWkUHbj8+fMsVWQmDuYe5D4zYbxSd7kHedl ZPy18ofP0mvYzrE3hwus2QrO7QZt2gRun1P10RqI5Z1Tm53GeBhhp9zrCzXimHfpcXjb u1jkMU149SqX+IsjTVnNyZcraztxZoYc9cXuw0WOXFl89K9P8IOA0baBcMjhRZD+sQvu qRjazjwvReHVYSEvP/QClprxNu/vSnaouGU6wmnX/sTt6CGKspoXky+wUClvOZPI/MnI FgdA== 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=jl0GjPeeLqyDSbPDhVNLljjqtlqFjqVlQj4mE2hFQOE=; b=1AcNGPBeVvcofaaOLAk0KyA3xjd55hnxPW7RWRRU6yx2XzyXxoYvVp6qqDUuf3M6// 3mhCZxvDzZ4w1trgG1k/++RXmK45g4kvguB/mJSuNEImBk3rloX9Gy/i5GR0yi0EZSnW +Zwm/5S4KXNV29CmzkrZ8In8a0zTfwbzLNJ+ZBTGUcFXlGs1jY14qXpNABc/zZqSykZl A8HbUHSgSDNyHwly97I5TSAn+2gh9kwL3Yvn0QNHXzDDHaprhELY0hrCHLiNHZoLY76H DxMAlv8BxJ1+8jUh3DJZOW7oHf26D/8lFFOgAXlYQJu89W57udMRTQyT92hz/2P3M2MX mrFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZHv4IyVL; 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 f5si8394973pgt.456.2017.11.20.08.27.33; Mon, 20 Nov 2017 08:27:44 -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=ZHv4IyVL; 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 S1751642AbdKTQ0o (ORCPT + 66 others); Mon, 20 Nov 2017 11:26:44 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36890 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbdKTQ0m (ORCPT ); Mon, 20 Nov 2017 11:26:42 -0500 Received: by mail-pg0-f65.google.com with SMTP id o7so7747979pgc.4; Mon, 20 Nov 2017 08:26:42 -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=jl0GjPeeLqyDSbPDhVNLljjqtlqFjqVlQj4mE2hFQOE=; b=ZHv4IyVLiCEibiMDTP3MQ9BclbWR5KvjVjsgReQNaGlFxFrhQgoc2k1YAy46p+kDJx AMUvUOt2kqtBrpaEeYMK9aa/Uncm3RDPa9rpLb2SqbDe9FaxK2PIyjCIm6rv7NZRhK0H heGgCpfj3fIfCpNrocsCYi3dwv8e+/PChLF/Dnylq+DWKEfSm8hKCZrmQ0dQa1HZ+wHz Yg9qWxTtI+HMt3GfFX5SJbi3/RZvnUPDFfzbshZrpwX287bRzzCqK5XWnlHgBIck2Pd+ iv35/96gw/VqmMCPjJg7SSbCbtgWRP9JlgbITuHXuWv/Yj6VE+BmUQpOJmipcN/8CffP iKlQ== 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=jl0GjPeeLqyDSbPDhVNLljjqtlqFjqVlQj4mE2hFQOE=; b=N6Pg3o5IVhnzvcJe7uloagwQdxr1YFRsmAMoSBHZGWd2fQJnbqpeIrN77bK/+V/z9z 9jXEZXQ42BxqjYMMLDMzGBN1ZhsLWCWS5Ro6mCQHdf2Rcds1VVBGzb2R/gvUdsgngiI7 o0Ki8mDoIfZwHQEbY8OIzXhP89MB0CjGpVJmbmKqbN33Vdd/x8nhbCr4oYr2px3+9vC/ mDh586LbPb+rV6vkTRWlptMbp+iweedkIaVlEmXC7WmIMaDpKnGlTZ5AZ4lvL6IpAbf3 R/z0oKGcFZApxbI9hKrgIypcluespaXe3pqfZs74jO8XaSZ6cxmH3lCDgcULUW3tajvo OEZA== X-Gm-Message-State: AJaThX7xYFG1t32b/q4xFn+7c1bUNwjgTYl9TxL8VAvURYs/xWAc9RNS rTO+KjKJE/AFHCPmKpeGt78= X-Received: by 10.101.71.205 with SMTP id f13mr14166850pgs.112.1511195202172; Mon, 20 Nov 2017 08:26:42 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r68sm20534975pfb.149.2017.11.20.08.26.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Nov 2017 08:26:41 -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 v4] Input: ep93xx_keypad: Fix platform_get_irq's error checking Date: Mon, 20 Nov 2017 21:56:21 +0530 Message-Id: <987ac156e9590cbe2f667f9782b56515d7a991a4.1511194239.git.arvind.yadav.cs@gmail.com> 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. changes ib v4 : Return -ENXIO insted of keypad->irq. Which was not correct in v3. drivers/input/keyboard/ep93xx_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index f77b295..c6eb31a 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -257,7 +257,7 @@ static int ep93xx_keypad_probe(struct platform_device *pdev) } keypad->irq = platform_get_irq(pdev, 0); - if (!keypad->irq) { + if (keypad->irq <= 0) { err = -ENXIO; goto failed_free; } -- 2.7.4 From 1584602953552385649@xxx Mon Nov 20 16:25:38 +0000 2017 X-GM-THRID: 1584465486576996231 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread