Received: by 10.223.164.202 with SMTP id h10csp1386322wrb; Fri, 17 Nov 2017 20:49:42 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ1AFfxjnbkUNAV0qTj8D1UFiWbTMmQQCiNrWsoJ000wK7wmjufMMgTaNZMiQHz1dLK4nRO X-Received: by 10.84.235.65 with SMTP id g1mr5619617plt.13.1510980582308; Fri, 17 Nov 2017 20:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510980582; cv=none; d=google.com; s=arc-20160816; b=zbZWB16oIMZnQ2hlf49Iepta6+o2kuwLyQt7UMYZjVIkshREPscnNcylWnTAv3WDXE s+IehW7Z50UDmfmeU2RG9auENWhiBQ3hJ7GSYgej+N0U8qqUri8bkOET+YYFpilLP2be X6N4G5yaDTrJ+x0qBQxMNsdXAytPEAtwFEgG0RHWy0+0NEhSt0nu5Zc0tmXA8KKYiJFa OErc+mGSsF1VKUuOi88PJ67woIThNktaM18A4s4xBX3BlKLTklE3iwfaD7GpsErEaYMJ N5nMZzQo+CkLiLHBopHrBfDV3LPyahMDAYKVq1r1fOla/s2ub76M/IlKsawKvunh7Fst 8QBg== 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=HJPjcLNxExWQPbIU2n8QqxCEKnT+d2Ym6b8x9TrWrl0=; b=fhbS27uUYX9SuRCb6lseXmc2Sa0FYchv39pfUHfNycMGliQGcJTmJIuqdmpqomfeFM QQ9a8kIjy5soO62lVMoMJ6TUULjF4KQbXeKtIMMIfR0FI6In5EfHNeNzWX5G1TwaRZvK UL+jhh/+b7QH09xvWMUVMKErE3UlbRqW7GwU5EBLqwxfQZXpml0Dt8VQqtTNXZn+gWLW QWP9/XYxKbl1w2jOM994wDNrT3fMqhwSAyBjBYhQ9irCx1XGCBT738V2wlyf/nDnBnfo 3g7CIkRuls8A1lR969JAY9GqZ+UtvhIHbH4wRSDJPmC4YFIlEKKksNa0hNC7kqfPJN9E fAaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UFycR/Sr; 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 d30si3949089pld.747.2017.11.17.20.49.28; Fri, 17 Nov 2017 20:49:42 -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=UFycR/Sr; 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 S1760225AbdKQUUz (ORCPT + 93 others); Fri, 17 Nov 2017 15:20:55 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34111 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161765AbdKQUUP (ORCPT ); Fri, 17 Nov 2017 15:20:15 -0500 Received: by mail-pg0-f68.google.com with SMTP id 4so2736438pge.1; Fri, 17 Nov 2017 12:20:15 -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=HJPjcLNxExWQPbIU2n8QqxCEKnT+d2Ym6b8x9TrWrl0=; b=UFycR/Sr6bad0prdAUjL9soxMAfe6lIUVSkLTmQIE5iWy9WBdUBhgBEPcBa4+0rWll j9ER7s5ERv7AVxbOIvO0FJlBJLzpvcWZROuYhv4R0Vs3XqCHwn/yvESSoVVQ8NLG7YU8 fYQdHA0lnF9fIeazE7UyIiezu81tbL1kgDIAul9Hod6+IXy4OyFauUnETgguXUC4Tk2S GacSsCYP/ylALlH025co+RhMlreAzCeu7PciVHckbMBcGdeT3Dq758Ye6gwBKsyAmCNQ idJgQRrvB7q1R+rGiWs+R4aACs1oQQvhitAD9eb+OzssvQ1ZADhvuS+1y2ctchtT1Fh7 gcgg== 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=HJPjcLNxExWQPbIU2n8QqxCEKnT+d2Ym6b8x9TrWrl0=; b=cJbLjE2leA5gOrD7cEEX+jQifxjXfS/c6PEjRucaXuNA0QMZbGJalgcyaiAjB6iFsJ rljpWiAeJnt/DCU4CKRJ9XDtAF7sfhVJn0wXe/ZnyCAtzrdtaOumTiWAlnsqFA4yu6eq BBiBYD3hmZeP8C3d8pQ2RjqZGClIQKSX2Kcq/MBQ32bkmbVn47fRYmGdWwBp64F/LCBL dknz7RIiqE6IAafiNuagl7dQ50GzFW5RMsIK0Jb3tvqy0zCZEwNwYewCcmboK/5lM+np NoAQ6UaZ83npKUuzrFJA+E98EkRPyX3YP9GJ3k9w7PNve86O+cQdoOSpZFtIQ260uQaQ jI0Q== X-Gm-Message-State: AJaThX7QWKt2vD7URlCqGYW5zcfG/1uc5vXTixVjJLtSY3k+2etZppm0 95OzQv3xd52hzkW1OF4cFqE= X-Received: by 10.99.122.73 with SMTP id j9mr6160920pgn.154.1510950015256; Fri, 17 Nov 2017 12:20:15 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id i3sm7674715pgc.88.2017.11.17.12.20.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 12:20:13 -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 1/10 v2] Input: ep93xx_keypad: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 01:50:01 +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 v2c: 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 1586068985584754537@xxx Wed Dec 06 20:47:35 +0000 2017 X-GM-THRID: 1586054622758419141 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread