Received: by 10.223.164.202 with SMTP id h10csp1303293wrb; Fri, 17 Nov 2017 18:33:10 -0800 (PST) X-Google-Smtp-Source: AGs4zMbeE40dstXeeRBZbs7DEhFdtsA8+/HgIHWFAsXMHEYkqD79pzq3PXFPDhuSAVlMdotlWLSs X-Received: by 10.99.117.12 with SMTP id q12mr7073331pgc.412.1510972390833; Fri, 17 Nov 2017 18:33:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510972390; cv=none; d=google.com; s=arc-20160816; b=RwphgvREdUet1M+WQ/Ppiw/DQeyBqOKg+TWJxgEZ2lpDT8q0IvOoxNPUqEVnVyo4eQ +L8HJD8CcSJfLsWt22+RTULvg3R1ZGa+odD3Lo4ZjK6iA599iLaxQr3FhZSvZRfLVMSN 2WcIdDlzsgsVxrtbylg3tykrsjbIYUIpZCPe/CG5wgtnNqoW1W38B6ufkHQ99+5O0Lgn CT1ZApyPM+MIgz3lKh7//dwnM1GSYq8Ee2NAf8hokTusdL78oH2QL5xyhMA6VfxRTjJb yPVC/5QM6hfJ344f7GlcT7gKcbxdZCMcoP6OsM9R4JzapdX126vekm0SCKBn118EdIuo /j4g== 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=7fWXDlvMFGOJ9qq2RLWPF4iCKPxsRztxGVp6nqPlFPA=; b=WZJanbOJWOGq/PvSWubo8p6CdvdEITsJUq4oIj3i9UaBVG5FC0MzWysLr0H9wXKMtG qYVt0PkFbSFO8Oe2CWP9sC98P4PmNQcLGfoFV3A7DwkDQHla7ZC/YHiqGmUD4VteUw4M Yx9PqktQk/jJhcJWB8TYsmRzqJK9+HdKzz8l6uq7o6uSm73Rp7kYoMqLJViQJZq7G/AF clVvHxqtISpkDZMZ8J3Nn8ON6ScmUpC4cKnOz8akGNb+yqtAvIltkvWOcv6P7vXcMof+ ETfOZtAbXwfWyzU90JRoMtI1534QqdsWUOeM8bHvkWG0CJWILbqNPujVFqzSPxHUx4ND 6WXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a9zH9YSl; 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 60si3816317plc.104.2017.11.17.18.32.57; Fri, 17 Nov 2017 18:33:10 -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=a9zH9YSl; 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 S935578AbdKQTQS (ORCPT + 93 others); Fri, 17 Nov 2017 14:16:18 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:46959 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935545AbdKQTQG (ORCPT ); Fri, 17 Nov 2017 14:16:06 -0500 Received: by mail-pf0-f195.google.com with SMTP id q4so2582900pfg.13; Fri, 17 Nov 2017 11:16:06 -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=7fWXDlvMFGOJ9qq2RLWPF4iCKPxsRztxGVp6nqPlFPA=; b=a9zH9YSlipx3Rq27G6LlYCs+TWjy+rMs2o51E6uasnlxqB5RxjL40cdMsjxoC6K2ww WzgTMvLPCCieL/a+fYLt85OpcsSUnOF7yL48OIkTFxyH/WS86Fh7B5Q7+NHeLzYTOFCC 3Pq2cILsaHbxdIZk9XV4Cx8KEQxbE7fSbQZ4EN23VZGgYftxB6xnpUcYikv7I+rtsMTo PZVTZ/8Qcc0kD0tH13sctW7ndC27E/XcDKpGTHyRv5c/0c2YAaITjM8aNBpb76QCRKWh vlW5I7fS3naWLpFO8SpcvbCf65F2f5f6on3JgEqKb4nqqnu4+JNGCeUEv1DDO58WmbF8 AYPg== 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=7fWXDlvMFGOJ9qq2RLWPF4iCKPxsRztxGVp6nqPlFPA=; b=qnTTD4WwLi98RRrcl3n2g4/U7AAFjN6yboE6G03pHlb1ADo/8tZ5daXYpHzO4yhc3V bfNyjMmDBslrJ2LSt+KLeKccQKdLoyjS5fahsvZu9czkysjOl1IYnln00aUxSQEdMO3v k1Ey6ShIHiPxv0xzuVqfKSgFEhDdX1h+4M0DSCaHv+01ivyaScatkvGnMPUgR8IPbAhk rz2/wLON9S7sAi1e8m8NKE4urIlfM2p5Yl0mjN/O1mdZMv78hp2SMP7rficI4W8xujSY IJO+64JIKOF18QcwJiea2Fmh6/+eHj8KT3ylopcr44KBs4oJeGjvzKz2CYdBlt7Td5SP eSqw== X-Gm-Message-State: AJaThX6FnBm0OEnsGnUwbCz+EQP5VJAuY6QDF077mFEtTaYg/QjfN0s9 eYijXdozhXjxYP9B7iUzzvqNbw== X-Received: by 10.84.128.73 with SMTP id 67mr6086995pla.96.1510946166278; Fri, 17 Nov 2017 11:16:06 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u188sm7807441pfb.188.2017.11.17.11.16.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:16:05 -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 03/10] Input: twl4030_keypad: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 00:45:25 +0530 Message-Id: <1510946132-13554-4-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/twl4030_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index f9f98ef..f94090e 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c @@ -389,7 +389,7 @@ static int twl4030_kp_probe(struct platform_device *pdev) } kp->irq = platform_get_irq(pdev, 0); - if (!kp->irq) { + if (kp->irq < 0) { dev_err(&pdev->dev, "no keyboard irq assigned\n"); return -EINVAL; } -- 2.7.4 From 1584377795936156236@xxx Sat Nov 18 04:46:51 +0000 2017 X-GM-THRID: 1584377795936156236 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread