Received: by 10.223.164.202 with SMTP id h10csp5337549wrb; Tue, 21 Nov 2017 08:12:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMZm+AjoaXBvP/gwYSJCYQp/bxqXbBezYc7UM05FTEM39xvjAjOACpQ5Hk3ImMfiBTepDguH X-Received: by 10.84.198.1 with SMTP id o1mr9137689pld.396.1511280778705; Tue, 21 Nov 2017 08:12:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511280778; cv=none; d=google.com; s=arc-20160816; b=d5vepLiGyPnX5L7YCtspP+mg9iFZMZxQE2NcE7hRxutp3/MxxESRWQvrh5QA0Z/I7K OC4kqQUq+yLQpKew7e1ZEGGmGvw3/a98vdEXNZlEJV6519Jdwclsg3xx5+fPBUncIdTs fhbL7UrJOuZvU5wpng9fd80mCp3YdeeXEpXV09w611ssTxj2y46s5g8lTYgrQnPRJNFa QcEeN4oDZ3EHtBIlI4EofKTghuZBzpkmQ7QMReji3kkCYStmVr18muLT0vMf/f1cm8gS PhxdSqEiZUgDMGcPJnGSO4Bwohk6udO9SeZQwegpoucnbSbmr4rpm5AZHxD5Cci2wUUe 4pnQ== 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=IFxAv1TlyoBReSIkK/v46oszVTskKTfPYTtZdjE1U+E=; b=sxa/ewJrifJ8FikBz4x70A8z8S9NiqXF5vYOuefKvFeDBQzKG7LGGG1O3XTvPjw8kl Ayv6qH4jThOz1a9sGbppEtbXfJ/RS+8hapoPafOGqf1FP3xl7tvI77g0VdSyBqchcNYk aGSR5RqkBa1DGKvnfrPxLYT318Jdkj0Tx6+0EJX6lg1HZoEwYOTcgzYiJ5LcW2p5UsKL rH4Uabuxp0srDsd//VhnfUVy8MxhaTKHEPcJ3mye9cRZBOUGBwMKAcWzQ2Qr+31SRuRy T+c+flxD5/JL8jJs+Uhq+rRBIFcttx/1asNtlCfsG/EMP0cglxA5Eo2LWZsx1+FJmdht FbJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fUoMVaYV; 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 f81si12329281pfj.30.2017.11.21.08.12.47; Tue, 21 Nov 2017 08:12:58 -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=fUoMVaYV; 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 S1751598AbdKUQMF (ORCPT + 76 others); Tue, 21 Nov 2017 11:12:05 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35981 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbdKUQMD (ORCPT ); Tue, 21 Nov 2017 11:12:03 -0500 Received: by mail-pg0-f67.google.com with SMTP id k190so5845699pga.3; Tue, 21 Nov 2017 08:12: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; bh=IFxAv1TlyoBReSIkK/v46oszVTskKTfPYTtZdjE1U+E=; b=fUoMVaYVA0BCK6dTDoHKIv7JJMtQJBy6oXqIthY6CajoO8ZBrDG0n3O+S+mM/lIMO3 Mj/Mz7DqYxtSRjLfOnat1HHr60fnH0Sn6T0Iqf1zrZ22aQTK6KXqLHZRaiHo1q8zg+f7 MT6QZYlY9cqY0+/8NJrlZJIyd5KNbqtMR/hAU+GQvaV9TitjtiDlg783pv7BVYT+NNaO GFtLArVgPN1VbfCUrseA/XGgsW4QqmbO1SSRAuHLvOAKnllzU7Sf5f2KkgFqP28QdAEF fB5Zwbt6W/r4bHCBBW4wUbtTzQ+GtLHHImR4BnWiI6bXkHaALPmc6607UYyl3vY/6mtF tHMw== 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=IFxAv1TlyoBReSIkK/v46oszVTskKTfPYTtZdjE1U+E=; b=pbD78HC6+JV4HtBmiAg4GFV3ZznRtY87twsYBadYpeAmFVGVp2ePnaeyuy9YiuKZOS 890B2FH/uoVMqT4/caxvMxEwZn8TBlCUArsGF0Q7cxNnbXFm+yWXR2KdjROlDXSKjSdT rGJ30JGf4Eon0FqFP/Imj+5sg5cjDAJZ9NRNld0U7cPiAujGiL3qlcaUZzY0CQSBBRAc RgsubRbNwg9M8P+5WcCMxLTh81dg2rw98TeVtG0blDuKVwDFf9k/YXR2YvSFZx4+1Z/H ZNhnSKnsn6PNLZtymrV691Ix6gNWL59KFdQCv29wzccaEB8pj0JL/qem5dBNYFm+CRKb Mh3g== X-Gm-Message-State: AJaThX4fDmsFljw/qCpQSS04CxIFu/yy27jQ66j97bmi49HAZRDjnZHf HmiNe45JoH2pHp1gdFzckQOgHw== X-Received: by 10.98.10.143 with SMTP id 15mr15556277pfk.89.1511280722807; Tue, 21 Nov 2017 08:12:02 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id h192sm9764931pfc.139.2017.11.21.08.11.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Nov 2017 08:12:01 -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 v5] Input: ep93xx_keypad: Fix platform_get_irq's error checking Date: Tue, 21 Nov 2017 21:41:51 +0530 Message-Id: <49ba0386f1930f58edfd5ee0f5e65d2a02a46744.1511280261.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 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; } -- 2.7.4 From 1585324014629019786@xxx Tue Nov 28 15:26:35 +0000 2017 X-GM-THRID: 1579618954403195363 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread