Received: by 10.223.164.202 with SMTP id h10csp2384896wrb; Sat, 18 Nov 2017 20:56:02 -0800 (PST) X-Google-Smtp-Source: AGs4zMaLNxAUlRR32oaRZ6v7WuMExmyuYgc4I7DYvWLtV+vFpI8lvpXn+0NcNyjSzeDA4CQt/P9N X-Received: by 10.84.233.131 with SMTP id l3mr9788148plk.295.1511067362487; Sat, 18 Nov 2017 20:56:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511067362; cv=none; d=google.com; s=arc-20160816; b=mtDkJ1YkpN8M58iNA2CYo6OXEK6XXSts7lumHVexOhXVhskzxlYByntOKgi3wCX7xe 8MGPlrkjd9qbRuxIija36y8Pi6KP8hvoU3e8/WjSZ4J/jLIuSjy91D6gMnQ2hKftb/wy ZGrO1zT/eARgUlH/GLyU1y2XOAyIKwlF7xwP7H7gHCmNVGH54GZtJqShoVS1XQq1O82f RDi3q/AagPK12z8khC3tuDgY5rGOOofZ9mD5QtS2LDx+QWE60cWEo3RLln3HBvd49uF0 dIl5L7qqf8EpDB3lkg4wG0b0+7kuW0AxQiHMiSRwm03Jcz0sPYd877kBHnP1Lbv2EHKx KsgA== 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=/dNHQeVwfe6bDvdn5cHntoOPiaJbQQ59731iAVB0hY0=; b=hdqgr0tQ40k6NCdTgBJteKQPldgS4wTJGB1WdtC82Jsj7GkZbp0Ge+bPE8MiBocpgX nB69hrsuiospt4Tv5MYyT3s0RzgFZ8+2K1bTz7WFIdDrC6C0yCG68+hhvU+HgRfjk0Ra pkcVt3/aHE02pDNOiheWp/q3FhpnmVcgyCnrEDEFpOBiSVP+H6Tu3NuppuaLWu9XnA7W c1I29lLZDXgiM7pE2G5DZhmAPQ/1TxiU3ej/i7WaCCTMYehNz6baK32koawAd+yw99b4 L1QNV98WPCFAkE2RCMVzzAEaLqSW6W7H2ki+N+KPKRLSVG9jT/7ywSQSrhCj6Usn+1/J ++bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m7vtxy+J; 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 u2si5588898pls.531.2017.11.18.20.55.51; Sat, 18 Nov 2017 20:56:02 -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=m7vtxy+J; 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 S1750815AbdKSExD (ORCPT + 75 others); Sat, 18 Nov 2017 23:53:03 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:42921 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbdKSExA (ORCPT ); Sat, 18 Nov 2017 23:53:00 -0500 Received: by mail-pg0-f68.google.com with SMTP id j16so4870149pgn.9; Sat, 18 Nov 2017 20:53:00 -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=/dNHQeVwfe6bDvdn5cHntoOPiaJbQQ59731iAVB0hY0=; b=m7vtxy+Jm0cZX87CCJWw3ZnFJDReJPcgNLO0iRPP1St2VlSCkI4Hh1Q2wM/q4a+OkJ FZHOu4Iz+GSi2HmtRfqOCkNO1fHyhE0GYhlIJdJkxTZAZ6ZYFAgsHqq6XsvH98tt211K /WzLJUA8xr6LA+2OYjpxbBc4WWfV92Ff+xanxKdQKYX87/aI+Nag08K1vrFBCNhrCIyy IjMzwekKEzgCNz30v0bixaNNKtmcJ6xYgAO7pVjXUoR0c8LuL9WqLSqcdM2MdnzQqJO1 0ZSYRcz/n18JwjA7phdRvhl8PBedHxXqD8mkzjC2RALYrJ1W8qxb1q6HjHeiMHKG+z0S j3kw== 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=/dNHQeVwfe6bDvdn5cHntoOPiaJbQQ59731iAVB0hY0=; b=jwoZ4KtCDir+2Ma4GzaGcOZ/kNVExg15sLIFIg+BxSfDewmMf/WzFrYp1/FdM2P/Zu 6R0mN2IOCZGg9vbiKxlBPzUomge2cL1DGaSiljoGKgoKTYbrlJ9TfVmD/sNAi+1mKZxJ WXUa4e+UAJUE0/RTMfDdKEYSYhQS/j1tLRfMb2I6t2VrJQyhB2qCiPIAZFLK8EkynaMK zkGqCFccFiHKd3zTbRXQzosUA4TiJJOzh2hOznocT3Po2ohs2pntii8E/iVsRlLXc01C bqliP5dJA8YZp9Np44TSQOpjxDh66C/ZKgVuBg6RC3kr3QXjP3i6NQ3Uw5idWC/BVje+ 9G6Q== X-Gm-Message-State: AJaThX74mg07ZlY5eZodrKM7FbJKcS+aFoDEACmylYlnJ5zMH/XxwTQR faoyAkbIHVPxTit7KS14GxQ= X-Received: by 10.99.134.73 with SMTP id x70mr9943489pgd.130.1511067179702; Sat, 18 Nov 2017 20:52:59 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id j79sm2312952pfe.129.2017.11.18.20.52.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 20:52:59 -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 v3] mmc: meson-gx-mmc: Fix platform_get_irq's error checking Date: Sun, 19 Nov 2017 10:22:43 +0530 Message-Id: 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. changes in v3 : return -EINVAL instead of irq. drivers/mmc/host/meson-gx-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index e0862d3..32a6a22 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1208,7 +1208,7 @@ 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; goto free_host; -- 2.7.4 From 1588691290606659836@xxx Thu Jan 04 19:28:00 +0000 2018 X-GM-THRID: 1586056448698861865 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01