Received: by 10.223.164.202 with SMTP id h10csp1572132wrb; Sat, 18 Nov 2017 01:38:31 -0800 (PST) X-Google-Smtp-Source: AGs4zMZdVmFIkuF/6W5ThJu8F2lVkBfymGS2ZEpZwcfoJzl5J01HmFrKwXbbmWQFcCeNPn3W+QZk X-Received: by 10.159.230.13 with SMTP id u13mr7912844plq.226.1510997911833; Sat, 18 Nov 2017 01:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510997911; cv=none; d=google.com; s=arc-20160816; b=SRCGLmwSm4nv3yfYW6NIEXo/yu+AT/jNs3rOyFql3GN3ft1QXcGiV/J41QJT6wlRZ7 jWJlcpy4u1+UFeZ4t+obOcf+LZ4G7bYUO506Xz2m1qJZ62w/D9dmF1oL6xpTyeEdt9M7 Mo7++GeQcuvURLMw/rM9c24G0c1i7VC6Igl0EC0xkXtAqQDGi95eoUmnnTu8yYd6Ut7D enHEl1ZNR6NgnNmIrOnAzVxYaNDn0OceIN/CYhOZMo0Opg/U4xo1XujGxs6X3bTrDilJ AHkE+oPhieWG/qPVNJn+Gs+wMkx7exKOMJ8DYucXpvqDTJGe21T5X5h64nyKe8T17mLc OPGw== 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=WATHZFXQiNmRsrAOBvJDY6PRVcOjD1sm73+FZbdDZeU=; b=rCPN6SKNnivj1UiToAdqRi7i/wChfMlsxuXUZhH2NoJ+Ax9fhWCdPtBUz3NPuG38Ga kRSpRloJXXT7ZJY2xTZthzZ32qyfJt7j/8Jxo7UqvFN6QwFDp52OFqlsVOGu1hQBHhjp gwxJQG66737h55pSv6s7GvqTB3R57LnwwBndVzAA1gMxLi32lJg9bCipTb03pA8E1Y2n tefxqgjpReyJ5v03H8GjVzfVQr7UeoqlQbAYaoJWAGUDdHVTQjBvi7nAeSTeuKj+u0VB B0sl5/k8FCdsTDwdXRV913ovhdSgnTB3jovb02rXqNl1H+QskDG1gCvvUm4Crm7yFsWq mU+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z9nnrBOl; 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 f5si4254220pgn.126.2017.11.18.01.38.19; Sat, 18 Nov 2017 01:38:31 -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=Z9nnrBOl; 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 S935718AbdKQUan (ORCPT + 93 others); Fri, 17 Nov 2017 15:30:43 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33674 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761003AbdKQU2l (ORCPT ); Fri, 17 Nov 2017 15:28:41 -0500 Received: by mail-pf0-f193.google.com with SMTP id a84so2733387pfl.0; Fri, 17 Nov 2017 12:28:41 -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=QgpVEJ9fRSt5ZOh1nZ8I8PSbjAm4rUYh1wIVS/fkMMgfeuVa4t6MQHQeJA+u4XV0qv igo27AFnVz8FGxdU9dfRZMm4RcC2fHoj554xPrU/Qf1S11PK94OkDDXjx2sF2hk1RgzV JUsBNyO4FJTn/QZ9OKK0jtAxB/dGZ3dpjWf191ymidtRLn5NbGhk+wSDSGgfKFtzTw3Q AdHeikZcDG8CuGJsNV6vh7YQGYH+zsToBDoxpQ9et+ktqy0E+oeC8hr76wOVW+TUzCfN tUf+xaPu9uiov1i0NU6lYQMS+SDHy7+H37fkFhcQB9V7G4Jr3yhAiSg7dYy7mkdv4WoL yVTg== X-Gm-Message-State: AJaThX78tBvMh3mWywauWkWA71ctwTaoYOKrxnV8+mG+1//PuF0fqBPq o2+JQC8sHPomZoNInQaBhAk= 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 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 Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.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> 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/mmc/host/s3cmci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.7.4 From 1584356415792572683@xxx Fri Nov 17 23:07:01 +0000 2017 X-GM-THRID: 1584307913641670088 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread