Received: by 10.223.164.202 with SMTP id h10csp2349505wrb; Sat, 18 Nov 2017 19:56:02 -0800 (PST) X-Google-Smtp-Source: AGs4zMaP+c+qgJvD85BvLnSc/GqqepCB/WTCC3ED0+AjywEqvT14W/40wGie2E8T9ktrSGxsd26V X-Received: by 10.101.72.196 with SMTP id o4mr9555373pgs.147.1511063761887; Sat, 18 Nov 2017 19:56:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063761; cv=none; d=google.com; s=arc-20160816; b=Jyf+ML7gVNlN4xsnWKOoI6YJWysxzHEuqYHF0ffMNMaE7DKpWmVsR7fvcpSdvSZtxb 47itMi804apRN9L+yWgJbW5fBUbkTHfVBg/cmP/vDm6ff1QYlP77LJWoqRF3p/XsDkwn JU2bOSI7p/fYE5bSbzfY1WOw8GZX1d3DLDgirX36+egKfIkKNZY8tylJcsTyEyEIWBzO wtw7KvG+fg0Ewt/0d4BNiOxZqPKWs6ghbrqG0Og1kX8hhWthbPhYiqzx+uvQZhCqNDHt 11/83w0e1xt5olGMFFVqg4WeLjs1QmBkxOc8QF5pJ5dVKUHMx+zQfe07D9D+UhzCa870 iHww== 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=UgDAr7GgC0b+vZbkcTH8Lo6yPa0N1X9AzuDfrGtxZmI=; b=KnPmg6V4HvgWUpwq4hXCJb7MF/C8LIVWIdmz6L6BLsWcikiMGHRyfZ3g0+RH7YdUqC /vG0wXiK7mD7f34CFO8amYiReRCnKGXaiEOxXUQUHx9Y5IR8MzvPKH308nKj93nfUQo5 dEsM2QKR503dTMI/PgsxLeIQkNvWSB813dKm5Mpbrpcrc2jLaHVASzUwKvqPCsG+zES5 mtpWB7it84hh8gCVXztNS/fHKwO6Hpe/z1lhmt1ce3TUZW5EU9V0Vq74i7r9IkcuRIDM b8j3Lr6uzwUQXqLHfUZXfilRi2ofL6G+RUQDZ7yxIhtZ7rwa2WT0CTO+5QkrtObJe2NQ GY6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gHxvqztv; 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 k126si5999780pfc.348.2017.11.18.19.55.49; Sat, 18 Nov 2017 19:56:01 -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=gHxvqztv; 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 S1163382AbdKRJfO (ORCPT + 93 others); Sat, 18 Nov 2017 04:35:14 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:38655 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161857AbdKRJeP (ORCPT ); Sat, 18 Nov 2017 04:34:15 -0500 Received: by mail-pf0-f193.google.com with SMTP id r62so3736964pfd.5; Sat, 18 Nov 2017 01:34:15 -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=UgDAr7GgC0b+vZbkcTH8Lo6yPa0N1X9AzuDfrGtxZmI=; b=gHxvqztvpLbL9AVg4tesTdmlIdo/fO6UmDIn4LV+dTfsexlF6NDtqd6aeWZbTZOT38 FNnX+4uHTV1tdCzLLuZi9kMHRaOjCoQ5q/zvBXo1YwPjTA6DaqtLUKqChU6/TfKDAek8 T6KgY7SX2n/V0Nd0m+wQ11bS/x+y6AK29mA72P44tJemgZb7vzPm8+6B/IsIuvIwT/s/ rPOmkNLrARvt012KxtoJMjoPmdSzHX1w7ZTfWcpJB1bDGaxZf7ApmpMicT4bQcmq1CD9 haUa+oZ7R1UA15Yu+D1VqcSfkAoceyhw3+2f4Sw5A2ixPBIIMtMBf3BAse9yFVmH3PtE B2Aw== 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=UgDAr7GgC0b+vZbkcTH8Lo6yPa0N1X9AzuDfrGtxZmI=; b=Q+6z2BrHMS5HeO8wY+/89z1Ejz124ZM1S2/4lhEgMy6H7AQGjFsUhRocZWSRjeWijH s0SOLRf/qDp22PMZg8bLjbejYTLDHcvz1Gnuf2o/GonwfcyGksxEdt1J2RMlSKDj66i2 zA+h6rrW8RwD5yDbdZZfVrY4PviNtI9DU8Nd8NenBvpjV0fOjyK8WKieakfwzwqLC87D Yq+8MCa6W7JZt0gRW84/GS54lXIlYJ3wLICoKh7vm47t5tCNUScQVpFgjZZWLqtZ9E20 e6Wfl/72pWRKl7zGNhC8tXjSoWkva1gsWkhjRCEiTaQM9Z/+ljmuncWDWoLbWw6V/x85 M14w== X-Gm-Message-State: AJaThX4J0xgg/PP6iYiDFgiD6r1jf8OOCUnPOCtE96TA9Xna+kdLyv2U x0XRZKAR3RR3nukAWse4V4I= X-Received: by 10.98.79.152 with SMTP id f24mr4971618pfj.143.1510997655300; Sat, 18 Nov 2017 01:34:15 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id y20sm11057079pgc.52.2017.11.18.01.34.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:34:14 -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 v2] mmc: s3cmci: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 15:03:44 +0530 Message-Id: <7952b7c2d5bb853ac6b09517e634b1838d9729a2.1510997223.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <130df0c2c60ed6a0f460b68c586cc0a4167aed0b.1510997223.git.arvind.yadav.cs@gmail.com> References: <130df0c2c60ed6a0f460b68c586cc0a4167aed0b.1510997223.git.arvind.yadav.cs@gmail.com> In-Reply-To: <130df0c2c60ed6a0f460b68c586cc0a4167aed0b.1510997223.git.arvind.yadav.cs@gmail.com> References: <130df0c2c60ed6a0f460b68c586cc0a4167aed0b.1510997223.git.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 --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. 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 1584346631659705380@xxx Fri Nov 17 20:31:30 +0000 2017 X-GM-THRID: 1584346631659705380 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread