Received: by 10.223.164.202 with SMTP id h10csp2383855wrb; Sat, 18 Nov 2017 20:54:25 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ5txUyqtiD6SJEJaJwXfsDuNKcZWdr2BJCe7FG9H5ZoNY3MAl9QylZV7xivKknrNtwYAJC X-Received: by 10.98.100.71 with SMTP id y68mr7154348pfb.178.1511067265271; Sat, 18 Nov 2017 20:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511067265; cv=none; d=google.com; s=arc-20160816; b=FrO5gnT19bSh/k16uudfV3mFXP7AB5/TZKmfjI8LizCeQwc9e1lVIDVS40I4IBktmi I8RknLX6avB8gRkJt38JlUD2/qZY89WBFcuVAztB7uRuSSd8bLkp13ABAhexhrWvnVvT vqnp0bvHIy/o9gu2eInSLEAjldxIiHGylXVxGk6VnkP9gBTECfTn9nLvvG+lg+N72yAa aAoGCWtVdFPRHu4MMRPWV9twPaAP9xTiFqn5cM+0uBs+H/JK+6l+E0Yc61VhMWbt7RRZ 4eBCIqWGOnVXeSxHPNCe0QxTMdkfIjj8QYWZKqHzCEQe8upqzH6RWezXIZ4yIjHp5din 5IPQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=bAr7MsmmBEpiqbPLCvrWBSiyp4C27JXgrFgjxXBhqCM=; b=j2F314UMlwAS9GKGUdvQxFFFWcg1Bq6KBhuMPYVr4Gz9Xaxl72PlKS9FCeEvzdcXsB dI/44ldMoFELOQ3GLOsBFOTffpkQbEBT7yNB7zvlxL2fSJpqEcK8I/qujJj9Cu8dCpyV YYXQoI44d8DSftEqxml0YReXh773JBojStCA6bzhLduZHfNI8ZJE64gSvXNRK+qOzsWS M67e9WH8dUj837eLPJaUE8jFFX0opissjBkjTW72LHtpJeXUUBzw8MvEYpPNBXu+saFm 5prHBro8Yp4rsV1ZbNpU4rierqiT/YxOQE6o32H6ygHMUkfLYEdaJbSvySsPkQQmVf8R bPIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HsTfEYmR; 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 p5si5464203pga.743.2017.11.18.20.54.06; Sat, 18 Nov 2017 20:54:25 -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=HsTfEYmR; 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 S1750915AbdKSExH (ORCPT + 75 others); Sat, 18 Nov 2017 23:53:07 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:40788 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbdKSExE (ORCPT ); Sat, 18 Nov 2017 23:53:04 -0500 Received: by mail-pg0-f68.google.com with SMTP id u3so4875083pgn.7; Sat, 18 Nov 2017 20:53:04 -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 :in-reply-to:references; bh=bAr7MsmmBEpiqbPLCvrWBSiyp4C27JXgrFgjxXBhqCM=; b=HsTfEYmRo2HOjQ+IR/Iv0VKILrczQAf74b7SzrF9jCRLwoFGtg8Dz4PovK8jWg4hSs tnE4aXsbcqnSOqApq73+FEzIU6C1Bxmln2dDyOTYDogdBWfjPkmONgd24kWj0cLqnwGa ME9KLb9aPVlK0VnORLGT5Xc0YssC9971+3NkcqDdgmH07K4YP7PRlImsDsRNLAKioeJy HmZjMxfGNUnU3Nfa3Lbj9thIQECf0aXtrSs5O0ve94CFfx8d10CD8J2PxIh6s0DXsF3Q /Dos7O+C+SWGS6u4a+dweCXoGN5h2m8POjr1x4kJpODOvAgxAeDRqeiVAWLo88DzA7Sn VWMg== 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:in-reply-to:references; bh=bAr7MsmmBEpiqbPLCvrWBSiyp4C27JXgrFgjxXBhqCM=; b=dh1u+sV2DcKeBvRN7Vi8LwqfvOAK/HBfFpfbFg5wnRiRM3cklR3dtyTeK7+Ffd1d3M bWJWEparI9PQcjrEBZJnw0KVPgObqV5I89oHOtCOaD8hugh3G+hxBmTf4+QzY8JVZBGd 4AKnAIAkCE+z7C0MnY/SSaQeL8+9BZ6eMQ/LCf/kthbZIfOsUqObHbsMe3RYXDYbvBKh eZDXHH28KpkBkYKpLBjXimzkJ+jqb8MR+FBbXoiazQ/7kJ8pcw3Wkey4XS0tMYmQxQOH mXW0m360dv7arNzKqxYavltaXXBp6chR6rnJo20n8x/KBtHIJz8C2dL+CanzXy5V9Aek zb9g== X-Gm-Message-State: AJaThX4dZIttQ6VFxkG1zB+CWS+drzYZ6RyQOElwDtTBqZiPpWBQWtHa mexjA/rkfHd9YFyA7TMqPG8= X-Received: by 10.99.149.12 with SMTP id p12mr9334982pgd.381.1511067184112; Sat, 18 Nov 2017 20:53:04 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id j79sm2312952pfe.129.2017.11.18.20.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 20:53:03 -0800 (PST) From: Arvind Yadav 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 Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 2/6 v3] mmc: s3cmci: Fix platform_get_irq's error checking Date: Sun, 19 Nov 2017 10:22:44 +0530 Message-Id: <870b1a28108a8c0f3885bd345f3d27dda67621d5.1511066652.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: 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 --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. changes in v3 : return -EINVAL instead of host->irq. drivers/mmc/host/s3cmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index f7f157a..36daee1 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1658,7 +1658,7 @@ 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; goto probe_iounmap; -- 2.7.4 From 1585075692050081417@xxx Sat Nov 25 21:39:37 +0000 2017 X-GM-THRID: 1585063639090430392 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread