Received: by 10.223.164.202 with SMTP id h10csp1212793wrb; Fri, 17 Nov 2017 16:20:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMZsY1tCu0TWc9EFGmMv8wQrXEQeDMEkRpzUew5zMjFR+1jDIE/6IE1Z5uQuI84Olj3kgXy9 X-Received: by 10.84.129.132 with SMTP id b4mr6800311plb.412.1510964423192; Fri, 17 Nov 2017 16:20:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510964423; cv=none; d=google.com; s=arc-20160816; b=RdcGV7v6OX3gJQPUffWKdBygkkM/3YinxSV+xqyMInOhqdhGSSUeAs/TPcl4+rCXLb L1Umknm/reV3/cPpAAq0fjjt+qcdS2kY9WS3WlzV25GzF3m9jRb+eXJYF+EQ7JhPgtCC TLwkliVIqGq9qx+IyBY6XTZX75U0ZbR4XYQNnNXav3sC+DyEPZjKpi071mvquPgBnU6J /QmPyVv3hzZSrlA/ob+1XztYwAsqp6H30tKVMc0xV4XGs8+D7jd+d5E3e7rQZrQc/5sT YtJkuYVSI2A6PHmUYS0t9y12Qy5ykoWFktOA10MNw0gZJh0JWSRcno3itwvacvurqiaW N4HA== 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=X3BAAw9srmxN1NUdc/b+xMgmUdwI2x8WciWKZlxZz2w=; b=bgA3bhizs05cjSA8lpxfB6WXXbJWbmlj6TO7S14sAml13x8GBn9+TMWBvBIQQkFGdH 0rwlh0LyF6QLMDEUbJL02L4g7913bZfCg+IwAJGM8r1bn1PoWvVNP73DBQGTKEpnc3Xq 0lb0iHPQNB9OikCh9VfsmAPwB1te36BS4SGdoF3N+bXWPVP773w0vWnkjK1UeUbbrQKY 0dBDAflssBOrkNDvC74K0vwY638jpFENMVEV67JA7slAomX+1Ao4r4f61h8kQ+7qZOtd 4yshV7XxzHVl5xxLDqdV2+4lJ+MEHphamy51l8o3NcPtI+wcmvK5HbJ6adIM62a+13L1 fmfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YIRA5D2D; 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 g6si3481898pgf.759.2017.11.17.16.20.09; Fri, 17 Nov 2017 16:20:23 -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=YIRA5D2D; 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 S966329AbdKQTQj (ORCPT + 93 others); Fri, 17 Nov 2017 14:16:39 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:42102 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935515AbdKQTQK (ORCPT ); Fri, 17 Nov 2017 14:16:10 -0500 Received: by mail-pf0-f196.google.com with SMTP id m88so2589062pfi.9; Fri, 17 Nov 2017 11:16:10 -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=X3BAAw9srmxN1NUdc/b+xMgmUdwI2x8WciWKZlxZz2w=; b=YIRA5D2DmquLqf7A+EVWsCf1De5cCfNya5HnIjrplJInvdSG3gZlG3Swvc61AswEqY xhM88g2qkjZHdW+gF80dHDd3YZoziYZNx2MZo6PrcBmr52F1fMoEjc5g3cSwnv+NCMYV 7xMJ8lFCgbujIsm28rE605oushwMLQQkLrbB0xbyLoWsYlHrgFRZUea7uVdwzR/aT45C vUIPxVMPh2VKaKXq1OZy+7QPPFaoik+GXNsZT1vBcC3deiBfM60wFgjwXKDRvaz5m/Xy 4Jimvmd/n6/birztjPTp3woWLhebU0aIik9l/hFdRoZ3X25795J/owXvowLmXPm5jCit Q6bw== 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=X3BAAw9srmxN1NUdc/b+xMgmUdwI2x8WciWKZlxZz2w=; b=EVm9gCyhAculoKQoONtmcv04IYOXjvjfk1tDRC2Gjea3pPsFao7SHP4lP+Dkvt9Wo/ vs0QcC0A7JSZWR11bPJUnrPakT26NEwOZTsxjwAlN7nNFSXmwsws98tRLd2PjE4Kg0so zvX8m6iiryqByrVIAVq09n+25qDkNJPijGnN/X/dZeFSQ+yDmDl+ULPUOeeNJ61ll5iI ACCgkkRH95j+x9kSHIuXFqFU0Bf/xN6gXVgU7R4iIgBozmF3mokWvSmLC9P4TTZ8mj5G B2OHImk498rzQR+z7XLkVp6A3LISkPYtdChqnh2WNa3zusos5GP8ZBXruje4poNYjXjq namw== X-Gm-Message-State: AJaThX7xDjszeJGMFfg4icU3hkPLYlQC9I+PRE4g3xnMpxnPIiAylTHr luD17y9LetQpvpp2Y+eG4uE= X-Received: by 10.98.34.199 with SMTP id p68mr3041732pfj.241.1510946169784; Fri, 17 Nov 2017 11:16:09 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u188sm7807441pfb.188.2017.11.17.11.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:16:09 -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 04/10] Input: serio: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 00:45:26 +0530 Message-Id: <1510946132-13554-5-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/serio/sun4i-ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/serio/sun4i-ps2.c b/drivers/input/serio/sun4i-ps2.c index 04b96fe..405c82f 100644 --- a/drivers/input/serio/sun4i-ps2.c +++ b/drivers/input/serio/sun4i-ps2.c @@ -264,7 +264,7 @@ static int sun4i_ps2_probe(struct platform_device *pdev) /* Get IRQ for the device */ irq = platform_get_irq(pdev, 0); - if (!irq) { + if (irq < 0) { dev_err(dev, "no IRQ found\n"); error = -ENXIO; goto err_disable_clk; -- 2.7.4 From 1584394807100971388@xxx Sat Nov 18 09:17:14 +0000 2017 X-GM-THRID: 1584394807100971388 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread