Received: by 10.223.164.202 with SMTP id h10csp2369649wrb; Sat, 18 Nov 2017 20:28:53 -0800 (PST) X-Google-Smtp-Source: AGs4zMbSQ7wjVk+iGxRU5oEeWS/TqeowZBiZux2yT0vlQSySIuQWBS3XYUm4nbrEnIkH0iKtqkrY X-Received: by 10.84.178.131 with SMTP id z3mr9846681plb.165.1511065733742; Sat, 18 Nov 2017 20:28:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511065733; cv=none; d=google.com; s=arc-20160816; b=IaRrcB78QDN/Qmc0N8ofnmrlue8/FcXbleMdDFwHizcwDUYdOunRvPzEWK5n60/rE/ tGqKpNgfC1oE7ADvRJdQ/COb4mm6NcDEktnOw4tABymH6RXppEE5yHoFgmUScI7i9qG0 8h2rhhENgFUxKRTpC3ua6n+n8RVfUZw4Zx2Smd134RPuZ6nfXq29mVaCz9xcJYW1b7w/ 4ShJtan1IZcmobcLRRRjVU482ILXrmj1yPbOVQlnlpAgT8ZpBz2TEcN6mPhnongEynPh PeWTL4hxvhNaKyz8lMuVFIG4PCT5JNyYeBcPQoTMVe2wNa43jgW82I0TemPpfiNmDv8k jrvw== 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=phY0W32V2B7/MDhAuNPyopb2MAJXgBdviJbyRqaY0lI=; b=N/QAA/c/VYcAbGBZd/bHZJHW7t8CB81ZOqgcnT89gvTzu3myYV56QaZalPRfDFJuNb S08Ldq6XYZZexIopIBp+LTHFFuqIih/ouL67i0NvG+XefWc7sGrc6koIIuXBA3nwlcQ8 7wIakT3wXxI0HblvpQ9Nyd10YUw6A5cv/l3A+TdbN47xKj200aZ6loL+DpHZXtjcHnWx Ptzc8PisJ6wfCu40htAIn0bkW3TJpzYXEV+b/lINxJm+GK6aiKvOXqtG3jT7L61Lu5+x AyaR9ghAu/scCqBL/jdqA/a08PjfQGbbVKA6yMKZDl9H0Sb+fnN96wbWLbMQR5PvpSFQ 9CyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s/BdWkTk; 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 i11si5303531pgq.753.2017.11.18.20.28.42; Sat, 18 Nov 2017 20:28:53 -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=s/BdWkTk; 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 S1750991AbdKSE04 (ORCPT + 75 others); Sat, 18 Nov 2017 23:26:56 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:47076 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbdKSE0x (ORCPT ); Sat, 18 Nov 2017 23:26:53 -0500 Received: by mail-pg0-f68.google.com with SMTP id z184so4838753pgd.13 for ; Sat, 18 Nov 2017 20:26:53 -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=phY0W32V2B7/MDhAuNPyopb2MAJXgBdviJbyRqaY0lI=; b=s/BdWkTkD5TZZ7rfxVO1mYhfHZOVabIlpgKCLyE6k41nsVvUKoL4fZgDJ6eOS8ZiKt MRgOxhWUFJoi3dcHgN8JQyAosGBTOwXDrLViVsNkhpeYLJuNIB8RoN7wiCc5wpU+aSQE C5wuLZYv8K6K8+05T1pTQek8+uSrow53rij5U9KbhWHgIzb0ft07aMsBtgx0jHkqnyio A8MPHjh5je//DesO2Fxf8LGARcrsWTA7Hzmcpoo7zLzkp6vQlAU0F+KHIffxZ8pT31ly TMAxScwHOMMqIJJIPGWO8Nr9sHvbOrklSVTdu9YySCwBwKodagVqIK+ZnkKL6ourIrMP brEw== 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=phY0W32V2B7/MDhAuNPyopb2MAJXgBdviJbyRqaY0lI=; b=r4pAwptUXJ58w3Zw58dSYtjihssvGrqTmoxancd4m05OlV7kUGvpbNn/4/G2ES2IKf HugH200VfLJyrmZd8qBuKoksHnnE8IehmX/Lhj/eCG430gvRn85ABv7LTmeIE79hhby+ hNSjDHOG0KBvEHj0z7fOBy8JtFT+CxB+Jy6ySuc7f+JMtJqjSDT8krJZ2NJcPqHDsKHz nANg+GuW1lIgtk4m3EE20pHKcgNizfYEdF9UiyaYlcIiimUiCMZUSftqxL4iaXuxKAPA YZhQcUf52v5Vc+sJlnbBzQmTpesIw7JzViwLO8KpmysIXdJbrQHeKDD1xz2EPY2g/Yq2 VD7g== X-Gm-Message-State: AJaThX5LnZPLzJnVs3FmRjOQxqCj6YWKeIqk4BLkIHulCcu0KgrzbI3y AGnh/wM+J0uiFC/AM1wdF9kQ4g== X-Received: by 10.98.153.221 with SMTP id t90mr1004373pfk.210.1511065613183; Sat, 18 Nov 2017 20:26:53 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id e9sm11262795pgt.66.2017.11.18.20.26.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 20:26:52 -0800 (PST) From: Arvind Yadav To: lee.jones@linaro.org, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3 v3] mfd: ipaq-micro: Fix platform_get_irq's error checking Date: Sun, 19 Nov 2017 09:56:32 +0530 Message-Id: <1bdd59d511e4acd23aea6af51d06b1cadf09a1b2.1511065331.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 : Add failure case '<= 0' instead of '< 0'. If IRQ0 is not valid. changes in v3 : return -EINVAL insted of irq. drivers/mfd/ipaq-micro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index cd762d0..176cf65 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -410,7 +410,7 @@ static int __init micro_probe(struct platform_device *pdev) micro_reset_comm(micro); irq = platform_get_irq(pdev, 0); - if (!irq) + if (irq <= 0) return -EINVAL; ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr, IRQF_SHARED, "ipaq-micro", -- 2.7.4 From 1584396058300207787@xxx Sat Nov 18 09:37:07 +0000 2017 X-GM-THRID: 1584396058300207787 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread