Message ID | 130df0c2c60ed6a0f460b68c586cc0a4167aed0b.1510997223.git.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 E66D66023A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 09:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D469D2A895 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 09:49:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C85212A89D; Sat, 18 Nov 2017 09:49:01 +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 5AEA32A895 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 09:49:01 +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: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:In-Reply-To: References:List-Owner; bh=IZjePbu8ywdO1erKv023LiW0XNmHTbWKqwwF6yc7IAI=; b=FFq yn8JDeN/TwXxWmy4C1CtER/GbLhSu+ilVsgNKYl1uuM97AVjqqc+hOnfvcb6E1BYFf/gRTlLsD1qY i5DC8Ujgu/98lPHUPEAsIqXvgdvToxcYSb5214oRt5BPtU/T/GfqSEYjMsgBytw9411FNshdF03Kd PWOy6j6XPBqMCJMu78yKWR5oKDFB7owRAMNxvdEd1DjEe6IDWpsrR37g4tLIsA3k6Dd87fPaBBLuv it056MG0erTiMRV+7VLzfasPItrCXW1uvOIaXTurYi3EYOgwmqH3+4SxOQ2uwk+q3bz/rpiSpEqEJ SyZfpgR3NbH+ljHHphXQluBeax9a9eQ==; 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 1eFzk7-0007cL-HC; Sat, 18 Nov 2017 09:48:55 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFzWD-0007gF-K9; Sat, 18 Nov 2017 09:34:36 +0000 Received: by mail-pg0-x241.google.com with SMTP id s75so3765321pgs.0; Sat, 18 Nov 2017 01:34: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; bh=Ufw0q0MqueBceOQwpqGyTwwvOmHIH5OmipyxjgkIrvM=; b=k9gYt58v2q9Oq2oomTW6BGBW59Zdnk4KRegtvOy1NWhgJPtCNbQyJFKMXc4vaf9zUe EzHCRhC5CRZsk4L5ZuDUSTgKoO2aAsMB1qOF5ZfedRkSiaRoK0ahSPdk7hB0ByBEAh7k Tx2mL/JV29k81qq6Pyo3YvySKmS3BFDxCGKUrOV01iZBwwlew9YdiT3oYTZPMu+aktxi WoCUsoL12YQC4YhmIvjfPmvNyPAFCjVPFNhXiTHWDKw6qSLl6ESncq57MJEBln5zziKR fjYPAv7ylF1xRvc4BxlNEG/cNDtDym8WOcGcqmLB/zZUvKMgGrDCoEQ55cIUzjM80DJY avZw== 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=Ufw0q0MqueBceOQwpqGyTwwvOmHIH5OmipyxjgkIrvM=; b=EkC6bVKXxnSZVJf8wA6i9wX5WvOg3r/hJ6cpLdxON6Ffro2CTaVJPLDIggRt4Nbd74 YEf5OQ4cfFU97aY5zWrAix+UTMxFqvobzroPuUXBeCfmKkyIIFC4RC9Bmndxwf0N3MVE AZwRwRBZugFLO6npi5wdR+F35AvnmGHfsJ5gEBC1yZ9LPgxvGoGFNhLdMhxNSBUcNHpH DXQ37J3UjGcqc9JeE1cuQ6qbpVmfndOkkZonSc2LDzvlrToksx20bt3VUkV7khuhPORG kZ/TfcCiR0V+HLj+pm6Y70x4U+TR7hjImSPN0rUDV064p7jNiitoAq+C9SGeUNbf6ZTU JWug== X-Gm-Message-State: AJaThX7QUAWiRu4D+lTFf6YFrWmxQ8Y+9cpzb2kNJv8sJ4zYxV0GCgAL /CQtVwbXvj0kJc8zh67G2gY= X-Google-Smtp-Source: AGs4zMZkimIu2C1C1Wzj9+0YG3zE09AeDHpO12cpskIue0rZn7fJ+ipVGRHpz2kub7ze60+gYT3NoA== X-Received: by 10.98.219.198 with SMTP id f189mr4971891pfg.44.1510997650005; Sat, 18 Nov 2017 01:34:10 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id y20sm11057079pgc.52.2017.11.18.01.34.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:34:08 -0800 (PST) From: Arvind Yadav <arvind.yadav.cs@gmail.com> To: ben-linux@fluff.org, ulf.hansson@linaro.org, adrian.hunter@intel.com, vireshk@kernel.org, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, carlo@caione.org, khilman@baylibre.com Subject: [PATCH 1/6 v2] mmc: meson-gx-mmc: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 15:03:43 +0530 Message-Id: <130df0c2c60ed6a0f460b68c586cc0a4167aed0b.1510997223.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171118_013433_878770_99650787 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. 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-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org, 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/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index e0862d3..d6a0695 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1208,9 +1208,9 @@ static int meson_mmc_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (!irq) { + if (irq <= 0) { dev_err(&pdev->dev, "failed to get interrupt resource.\n"); - ret = -EINVAL; + ret = irq; goto free_host; }
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> --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. drivers/mmc/host/meson-gx-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)