Received: by 10.223.164.202 with SMTP id h10csp1572503wrb; Sat, 18 Nov 2017 01:39:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMZRCJWhlpht3FE68DNa0yEMO0cBlndZS6ueXFWbE9FnBNAtbY84Up6cM7yKDJWx1yW2aFjZ X-Received: by 10.98.68.8 with SMTP id r8mr4872834pfa.161.1510997945211; Sat, 18 Nov 2017 01:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510997945; cv=none; d=google.com; s=arc-20160816; b=R4g+8YThD+HHFvqBtPfZGPlG+IWD8UrAjjpsQGIMYGvkjS9xFbMuZUzKuPo2PYSi08 N4jH3R+9HVf2C7RIf82MvXRU8DE3ndJS8M6dOY09DPAxDubVJ7e6MIrW42mDjTQjAjXd exZDmqm6j7ueuZWYlmUBNmUbvfHV714WzmY3trHboI9of3gVHZXzmtNMRvgs4SAGb1uK lcfa2NItrxPJo9tiEg/8ZeoxNvjGbz0riptDjBpFrLHtjzRG0ehce4WtPRhhyqlyZCSP Ta3nbhZHrbG7vcOgCXiUiTvMPM0RsKTAh0YJed7CvdV62acmylM6cLjgt8eVWJ9/YjS9 miag== 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=FvKvxrxr/Wcjxtr4PGEUJBAgXwPDdIv7VTMRo8kDcTA=; b=Nc7K6aHWt2EKdwpM6/8U/hIH6VLTISvP0Ia7W3+KbQTDpMYFLPeLOz+8aSVpho8vgg 6qEceXFcTtJqMN0DHNscUQo/5s4kA9RnzoK6O2dMT7q6srT5yvATcVb58OHgiSygGPyQ o7K+8ZI2eT1B2vC37TM1AxnMSGI30TPgyaY36UTilWwXzTpcMRr8JNs2nHkxCLjAL8U6 q/MwpbKuVR3xDjTT9iYSHroiqJaUWwp2cr+lHD425NfcpWlDimXi/a/eoSfLME3h+iiD Jlb3LXiCGGvMUVrAtBJ0JIUuKxyHwZ6iZJ464358SgYbHe4PXXneJFCCS3k/uGsGy6W+ MRxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F6uUMQra; 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 f35si4270531plh.809.2017.11.18.01.38.52; Sat, 18 Nov 2017 01:39:05 -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=F6uUMQra; 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 S1761127AbdKQUbM (ORCPT + 93 others); Fri, 17 Nov 2017 15:31:12 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33671 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760079AbdKQU2h (ORCPT ); Fri, 17 Nov 2017 15:28:37 -0500 Received: by mail-pf0-f194.google.com with SMTP id a84so2733307pfl.0; Fri, 17 Nov 2017 12:28:37 -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=FvKvxrxr/Wcjxtr4PGEUJBAgXwPDdIv7VTMRo8kDcTA=; b=F6uUMQraKk3H6UhTilspDG79H3/pqtcFQDUkuNZVSAMeg6rjP5eAFHa8xjpIYFWF1q 2ofAVKrnUASbEn08N8gERFznetZnWrJHkZpkczjpIxG/NZW7ZfZH3Q5mHca+8JoxPhjq krLadhyp+WNW34+VpdZFoBCk6ksfFuYzDe6G3lV9vo5Ot9noH9K4ZkvtmhBd607YvE5i IbyMSAhIhndUFw3VhtGteawo4k8wqHykAgCWjpzIZF4LVYrAzQzxc1xeNCEVbKDMgNFv T6GQBM5yCa3ZZKjd1wQyrhJoPA+enfo7q3OJ4s9cHb4uMNNU3GiV6ojeTcCEe7/He9gj IrPA== 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=FvKvxrxr/Wcjxtr4PGEUJBAgXwPDdIv7VTMRo8kDcTA=; b=jpUCj7AEmJf5H3TWvhd/ysYdqYHn59cpAug+690wQnumSvzCbl89lTEaX2CwbyxEnP tqkgNGbb4EJicDQ4yMNNegyB3BAkpIt3oFZ1YoBTS8spnBkV8arBwoBmHCgpSSA/l4iz 4KFyjvDyLoeNEiGWy5xDrH9EsRODmLGzu6QU0jFJDd1Pa3HmSd1nVNpn0DTuLFHTvz2P XEJQKmd6bMj0ccuXPI5rFnq+isZq6rOHk9mBawCBOnYoV8dhJDUeWqYexp5yy8CrO1om Uu6XnfqNMNHkmOjGpVSsL9sDfKMRhkzdLGyxOOl0xL9ym4eHHLVeqo7qwwEHNYZrdV5q QVag== X-Gm-Message-State: AJaThX7dGGcLzYFF/teOoReDLN9Q39fTg417EfUsD30+xZIa+fxXnYUP m6Xkkqj3gklG1mqeLajjhtg= X-Received: by 10.99.108.7 with SMTP id h7mr6104924pgc.343.1510950516868; Fri, 17 Nov 2017 12:28:36 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id n72sm9382740pfg.109.2017.11.17.12.28.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 12:28:36 -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 1/6] mmc: meson-gx-mmc: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 01:58:17 +0530 Message-Id: <1510950502-22565-2-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/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 1586842117037941048@xxx Fri Dec 15 09:36:11 +0000 2017 X-GM-THRID: 1586489186653760668 X-Gmail-Labels: Inbox,Category Forums