Message ID | 1510950502-22565-3-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 8838F604D4 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 17 Nov 2017 20:37:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A59A2AD93 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 17 Nov 2017 20:37:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F16B2ADB0; Fri, 17 Nov 2017 20:37:05 +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 003722ADB8 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 17 Nov 2017 20:37:04 +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=gtE4++KrqyJRfSqR8kzYa/VjiCpBVQd/Nnu2n5dn1AI=; b=jhiyez/q8/swx0WjOKc+G/i4F4 4E/ZmPdwmrq6RrBQV4S/VX7w9jJ589IIBqHUlWTwtdmyrS48knXY2agZ08UiCoVJ41WcCVgLP4RZ4 YtwqtzwGo6SxPeO/Sa+t1qqG92jFF2zKZlIpjCVMf0HeZzxPzvHcnX462cfFCr6bHAaDxHmE4zzSD Z+KVJOrAooDUfbUzib/zlpqLlyRTJzG/s+a4VuRQrdw3L1yH85zF/XGREr9jFxsAc17gObjskJUry YotheqNX/Iad6FfmVb3KDtLp+ca5UQogISivY65GyXCFPsbYV4niRKXfmAN3D8mXvXAW6h+LSJQyP kHmvEWAw==; 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 1eFnNo-000670-A3; Fri, 17 Nov 2017 20:37:04 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFnNT-0005UM-PF; Fri, 17 Nov 2017 20:36:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WATHZFXQiNmRsrAOBvJDY6PRVcOjD1sm73+FZbdDZeU=; b=fvq1cQ4wD6nT7WgidSpyYLwVE FQln/uQ3A/KBA+f5eTjR6PHkv9dTprQZX9X8oKYABDJtT8B2Ng+YS9N5Nb8w1E5pvKjwMCzsPumBI 7zV5QfhzyoSbhtzsi3wFNfNIgTPp66pyGsDexj/sJZYUZmhp/HlWnirINKLQK7NxbSIL3YY7qs01j h1tKTCBX0Zoz4XWxTgeJ4Hy7Pzd3zhrJLN4ysWjZNpbYFUXobLMMCYBYbxrYgax65Cu7C5oKh8bYJ +CdTSpUAYZ2TToI+t79gBV00vRrRkcfi2n8sU0qRg6N9uV3QRC3sP82vVurDKdSGgrkv6voYTBQ+1 k0knOz9aw==; Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFnG2-0002xx-Eg; Fri, 17 Nov 2017 20:29:06 +0000 Received: by mail-pf0-x241.google.com with SMTP id j28so2713341pfk.8; Fri, 17 Nov 2017 12:28:42 -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=WATHZFXQiNmRsrAOBvJDY6PRVcOjD1sm73+FZbdDZeU=; b=Z9nnrBOl4CTxUQR7GjxPf+Yc9MCOjnYYpEynweP9nJ3qI7z1J2xs2g1+gbNu8UQMIq f6HfRymCxeVBgEbvTZNS2n4R7x9bCoQ/lLPuIMN7TVWlY1KFpaj5kfIFAb5Mu3sPGBQM RXWZzanAgA3y7yU2F6PM0dfSbyrvZ2g1cA2NUV7k10g5yMYvSNKLd9/0EUcedIKCnSxz cr/TBxwkSQ1FyCgzsSkZXRcDRpSwSH+/VgG2DxHaBpOtoDWF31JcpLYdOqZL6XL975VC 66VmnqaxBnrhjfQcddfkWlhNgGtnkSGbXFuUBWCiBvPKjDpZK0ZCsIJE7HiluCPtgGtd DhVA== 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=WATHZFXQiNmRsrAOBvJDY6PRVcOjD1sm73+FZbdDZeU=; b=QcJ+PWOwgFeyQ82wmlARv7pM60BKoA2spDgH2YWZG8YzSqUMQcCd176MJQFRPbwiNE K+ls/CMVlPAAe2mmQBu1t8PrDqrOtsBBXkEmhLrr32Ns3uH7VtN7qLlhKynCMy1jBhr/ fQtIa50GX8qjsahkMDIQUiagRjb/dlNTzRxKu1Wa90WNYerzMYt/5LumSwV5BbjHkIJZ BGiX1C8j38c/vTTQm5oddHEDJPZeIoW72Q75u5p5mJXTEhh0VS+yhgcpaeQZ99TTvi4j PQtKlM5eCTv2L/kWcA7WT+gT52tUA7YHEn+GUIlH2WinRUFF8SstCSYu7IcbvWO5iFc8 i6aA== X-Gm-Message-State: AJaThX4X4oKGjrKtbceOz/NN/reSywp2uBjfKsr5nAaDqUOBOag4hovL 7noPPLqT6p1rs3+wHmKB7Mk= X-Google-Smtp-Source: AGs4zMZjdJt3PeP1swkGVRfPcNV6FUni1YpUf8inisBhGd7d8+1KplMQDNLWBX3N1eY7RJMVUqDqdQ== X-Received: by 10.84.228.193 with SMTP id y1mr6427242pli.404.1510950520686; Fri, 17 Nov 2017 12:28:40 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id n72sm9382740pfg.109.2017.11.17.12.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 12:28:39 -0800 (PST) From: Arvind Yadav <arvind.yadav.cs@gmail.com> To: ulf.hansson@linaro.org, carlo@caione.org, khilman@baylibre.com, ben-linux@fluff.org, adrian.hunter@intel.com, vireshk@kernel.org, maxime.ripard@free-electrons.com, wens@csie.org Subject: [PATCH 2/6] mmc: s3cmci: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 01:58:18 +0530 Message-Id: <1510950502-22565-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510950502-22565-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510950502-22565-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_202902_631506_2EB863B9 X-CRM114-Status: GOOD ( 11.79 ) 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/s3cmci.c b/drivers/mmc/host/s3cmci.c index f7f157a..cc801bc 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1658,9 +1658,9 @@ static int s3cmci_probe(struct platform_device *pdev) } host->irq = platform_get_irq(pdev, 0); - if (host->irq == 0) { + if (host->irq < 0) { dev_err(&pdev->dev, "failed to get interrupt resource.\n"); - ret = -EINVAL; + ret = host->irq; goto probe_iounmap; }
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/mmc/host/s3cmci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)