Message ID | 1510986993-4936-2-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D28D560230 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 06:37:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA2102AEED for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 06:37:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF37A2AF0C; Sat, 18 Nov 2017 06:37:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A1802AF07 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 06:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=LZvnVZ4LixwW0EsSv4FUgX0ygL0xDIGI2rgo+BlgT3g=; b=Hbo7tu4jKlIdU9ClfxJBZ4YdXr wUPP8Jhb+hOXn1tIqLBngD1rvKJWK6pD4v/JKeZbtP92+Oox2d7r7j/nMt4hLd49Nb8zMS/ftvMXd 2OqrCFZZbg/yBL4MNXCzxPQB67wcUwM1rkA+wbJtJ6jbZtRCEFFRtg3zeJGKiUnaOjYmLCIwtvAU7 MefXXtsbdSVKpWbe/wB7d+Ac1O4HwgPe00tQcCjK1/ISKKlsg18lk2hJBMwbrnxnJgnlxEu/HzcoW YW4+FtriOQrDfagBmP4waDo/5UKEsVbzlhTEYVByKD2rFMy8xEnHfa1pdfVqB84o7GoCjqYAqlLWN Cy4sN8NQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eFwkc-0004ek-Cn; Sat, 18 Nov 2017 06:37:14 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFwkY-0004dI-VP for linux-arm-kernel@lists.infradead.org; Sat, 18 Nov 2017 06:37:12 +0000 Received: by mail-pf0-x244.google.com with SMTP id d28so3544088pfe.2 for <linux-arm-kernel@lists.infradead.org>; Fri, 17 Nov 2017 22:36:50 -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=o7X6YjeafvFgoxNf5NVvms5r5ZO90oL0aLjjFxz7vpi7Bic7U9cCCxeWM2hBpz1hcx p4Y2jJbrgqIa+zPcDm7LqUcB6RpOxTN7VO4Li64n5K9uTpEh+16xVnplfkBrelBiryAy V+/Xe1j4dxh424GciPMmNKQyyaFF9z/r2om440RRDY4sNbzZcGrZe6i41HXL4ZPO8XuZ AD3KFqnXAppCYDl18hYZQZnz0tIguxj5P8hcdDP8fe3ocpUeTanlst/+7sTfiq07tU0M 7erVwmiEMUtXZV1gL27T57yKP3759sUAZcM9SJ5KJ857u23Lf3hXo0lvjKCX8CVlDDhy LaZQ== X-Gm-Message-State: AJaThX5Q+9kuI47pNAsCtqa4M63WmdpSohSBWyXs4IJAKaBfk7UqkiUM N1j6loTZzSkPzbImBkeYic3UUgYv X-Google-Smtp-Source: AGs4zMY+Zq4VKE6yrlrWXpj6WLc4VvznjilKflaZkW12mcYAg0r/FAamr1TLJ/hyn/mP7j6x2x8UDQ== 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 <arvind.yadav.cs@gmail.com> To: lee.jones@linaro.org, maxime.ripard@free-electrons.com, wens@csie.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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171117_223711_068364_D0D88479 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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);
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 <arvind.yadav.cs@gmail.com> --- drivers/mfd/ipaq-micro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)