Received: by 10.223.164.202 with SMTP id h10csp2296111wrb; Sat, 18 Nov 2017 18:24:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMbPTkDwOHUlRJ1UUPhuoy2xjYjOyfXOXynP/8RVA+SZSrNjy7Ko4sKHpNyoeDBusEV1aLwX X-Received: by 10.101.90.133 with SMTP id c5mr9426232pgt.441.1511058274914; Sat, 18 Nov 2017 18:24:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511058274; cv=none; d=google.com; s=arc-20160816; b=hYjq2LHA7QC2lhHuKn0TwJ0gAREJuFGkvVGaTjRwATMNL1fuhS/N/nsl2jMFo0srac wDZ3IQj3UXo/sic3CkM8m1hkkMAbXv3izNcRUvQCBijGo/jnjq/Y/frAT17hmSAbu2V2 fEk2ypRwe/qW7ySPWsy5Iirb6yEELayj90rqi/3jYOYw4UEpGU2rHXbDhRGD3+kUay7E ZqFRTyJ6+Q6EM5wp1JaE1WtQUVBHAbVBmWjpAtyXygwvo7eCec8u89jI16lMxuY0cA7i z0k3JtkGUAKfXSBqAXGRbW4q8Q30wjfpzz7aP51f3VzPAdfWqxlwhOu92XcYC4eMVb2g w0cQ== 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=4sGHIFY9ES17DYam1R/owg7bTH3/V2xrQ241jVj0y7s=; b=mcelcENxaYc5Shunx+HIL2fBziXkoB/0Z68DnW+xyI4B3NUo/43uUH3gpvBgZ6uovQ aEF6v27afZ6UWhJxIL/LFCxhUAFwimogL1qtBnbAvqCHspXIuCLzhj0tEPOx5rSzmY3O VQTLRfoj0FIGslPjv01GEbY+jTW8nXHs8B7vKRPf513qafb4dhIpt5mz73FspRMSDilI 3KpZCkLxe+8VLM8/gc6wyjqZZ4GiXRpd946z8oUk0TFrvN9b6APIk2BnS8lR6vV9Dl/L cfg4VvjlHxK2IKrV7/MtFusy6QywIJ102r/WHMqTpTjJ00aCf8/yc7bNcGr+jD96+PMd kRuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VuQpgf2S; 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 x8si5298766plv.39.2017.11.18.18.24.20; Sat, 18 Nov 2017 18:24:34 -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=VuQpgf2S; 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 S1162797AbdKRGhG (ORCPT + 93 others); Sat, 18 Nov 2017 01:37:06 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:37032 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162773AbdKRGgv (ORCPT ); Sat, 18 Nov 2017 01:36:51 -0500 Received: by mail-pf0-f193.google.com with SMTP id t69so3541971pfg.4 for ; Fri, 17 Nov 2017 22:36:51 -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=4sGHIFY9ES17DYam1R/owg7bTH3/V2xrQ241jVj0y7s=; b=VuQpgf2S/BrqbDbN4VtLWyHXiEbiegQv/ZEC7AoHXCHjB69IN4LJrsDnNi+mPvp7mQ E9wI2Ph/dwnimDoEZjAiW1ty/hZ71RgqzofD/8n7Jk7FC6lQL7uV2pBMHPAKi135Jzy8 6ggA/Ab5U+vYWt/fpOLLrxLKOhyWfBYPNIxAQAocMeY3nTTB2bCkLWW6FBN3s0FO9kLg HUeztUBV8jakIniMs+AzoMm5NxNbLo8DDXGxF1aMzy05ArsgkT8enBz+VD76PI6cVM5G Rcss1j4c/kcm89HMPff3bDJjjFVB8XjRiKulkTvMoXKyFQtcUU/+Lur7Dc8NbftX7/AI 7rGA== 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=4sGHIFY9ES17DYam1R/owg7bTH3/V2xrQ241jVj0y7s=; b=deNAceQq3bqkMNB4lr+jmW3NbSEC4VKw6z+9+yedrrIUyywB9/XlscH1C2d+w98aMF cFhaJD0zFtXTznYSoNJEME/Oat/X1YhKC/M6ZqO4pRIAc9LGC9A2fk0Zni5fIxjPNtis CYRDYF9jNNuRC4EwIub+umNvzf8CCEZKdqx8qCTmRWV0O6ED/s14CLltQ4ieN4zM9KnO jAR/0PG0dcxswdVT2iJhn945TeuRqfYQmH9RVh2e1SYFth6xcezMBL1YZ88hrlqlXpAq RwBRtjrFGF8ze0M7aISu7V9xOCdfo76mopMDo5KBFtZpB/q1vsjkBWDzXuz+HsVyvI/4 WHcw== X-Gm-Message-State: AJaThX6e8nP8v3bF4k/QGmMx6VVkr1yXenPYWQyXUGrECzH+et0dwKGY qX5xDnUJtP6zPzgnI+wgHuw= X-Received: by 10.84.143.195 with SMTP id 61mr7598427plz.357.1510987010052; Fri, 17 Nov 2017 22:36:50 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id d68sm9905504pfl.38.2017.11.17.22.36.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 22:36:49 -0800 (PST) From: Arvind Yadav To: lee.jones@linaro.org, maxime.ripard@free-electrons.com, wens@csie.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] mfd: ipaq-micro: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 12:06:31 +0530 Message-Id: <1510986993-4936-2-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510986993-4936-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510986993-4936-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/mfd/ipaq-micro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index cd762d0..ea729db 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -410,8 +410,8 @@ static int __init micro_probe(struct platform_device *pdev) micro_reset_comm(micro); irq = platform_get_irq(pdev, 0); - if (!irq) - return -EINVAL; + if (irq < 0) + return irq; ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr, IRQF_SHARED, "ipaq-micro", micro); -- 2.7.4 From 1584401087811013143@xxx Sat Nov 18 10:57:04 +0000 2017 X-GM-THRID: 1584401087811013143 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread