Received: by 10.223.164.202 with SMTP id h10csp2349378wrb; Sat, 18 Nov 2017 19:55:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMaPH2u4STSTIdMnaIN/e6MySaivaTqQsrYf/kpQ3R51niGvSt8kZg8VnqKJUBOTsv2zAn40 X-Received: by 10.159.245.148 with SMTP id a20mr9782308pls.202.1511063748779; Sat, 18 Nov 2017 19:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063748; cv=none; d=google.com; s=arc-20160816; b=rRDKuSkrSalSFPGQaebn1TZkqwkWCRafM0e3DTPCiHtAjZOkeOki1hOHnEf5HWMf4g b3ZCx+S3E0YxB3dRzCEI7Iy9tLzcKP4aLSW9sggt8UaO0mvzFwPCokHnpSjtwnbRyfpY 1bTLqSqeD6KlaIcN4OqQ9Km6d8/rZhnG3CAAbpRgIii4sjPICXPhCpK/lb1S5QuNZTDD 5CNDrclYk6DkPAPg1x2fVe0RLAyQDC7XEEa5sZDual+DKDfADbj7s2Cxy6Mny802WY5u IUK8oaegCi63n3XVpMsk4prb1XwbG6iyr8VH2SlCb939MlpsB7VokOlZ4qLcrx+a81NB Og1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Ufw0q0MqueBceOQwpqGyTwwvOmHIH5OmipyxjgkIrvM=; b=XCBgHEB1L/u4goP3NWzFqJzlEjEcJDWt3+UpaQYMWzQwsqQWCOrGqFPY+Czds4sA/e /elR1TH3HaB+9N1HDQl0wMrW9+7S3bVAQr/ai1RR2oK6Y4RFIt4YSBDjw+UkbWCAafEr /E9zBHehK7wu7tn0IJg41QCeS1y7VT81X1boGeU+xKeG0P6J1+teWXPp206GFGxV13Jc d/cPYZpeLaEcjvkf1GSRQ3OccPxsVzn6R20bYjPWinmaFbO7t0+g7JEEjztocoPpXL5U DsEDVFBJ8d0AdFy7/I0GctCuvYsTZzUkN5njbbnnXxQzIx4e6bMvVIj/N0jZDgn2R/Om sz7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k9gYt58v; 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 a33si5617833plc.180.2017.11.18.19.55.36; Sat, 18 Nov 2017 19:55:48 -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=k9gYt58v; 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 S1163157AbdKRJeV (ORCPT + 93 others); Sat, 18 Nov 2017 04:34:21 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:44760 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161846AbdKRJeK (ORCPT ); Sat, 18 Nov 2017 04:34:10 -0500 Received: by mail-pg0-f68.google.com with SMTP id c123so3740845pga.11; 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=lRuLFOE5OavhzyhrG+dcOOjaQIneQADfdfPz41uGVgbGW1s8jr0lCXpF54RFYj2iz6 9ypF8TvCY+mOBIWIaXQui+AG8KOM5aX9e+pzOb8VfmhVb/y990PzCSPTtYHGgjujD1BD Oe2L+MLPYEt2yR6jc58JH2t/6x9uWLpXtjarPF7sYJf2m9PTwDFWvjxYA+3OMmM74U7k dMa583eC6V6aHZecao+saEMpJCgq549lF0J8Bb/5+llSfzriKNWh5ESOED5TSYcvXj4A FM6QuKSXoeheklzrekeK4IAYuFzNX9CEQvZvogn4ai/X1fo+ipks5jqGNSnKGkj8G+Yc kXMw== X-Gm-Message-State: AJaThX498mcBqqj8Z6CS5j9lUecAFfkqQkYNvhvOvcq84CMeJX9q6J5N nR3kG/Yoc5BZf1o1WPtR+F4= 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 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 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 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/meson-gx-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.7.4 From 1584180788508758796@xxx Thu Nov 16 00:35:30 +0000 2017 X-GM-THRID: 1584152532229484824 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread