Received: by 10.223.164.202 with SMTP id h10csp2350255wrb; Sat, 18 Nov 2017 19:57:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMYJ2ZHzWrqYDoowLhszTjuZZ2UFQJA727LGkR/YrGOu/wtASKtPv9n+iNym0Jsf5xzeWZ2m X-Received: by 10.101.71.134 with SMTP id e6mr9848302pgs.141.1511063842118; Sat, 18 Nov 2017 19:57:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063842; cv=none; d=google.com; s=arc-20160816; b=I6NVcEV/G919TTEo6RFSBDSf3kgeE2izP1P9Qr6SpMIhEmCcdbQJo8pcmWsb4w4ZuH B56o0MNRV1wEykbK7vyWKhmHBrDXT8lTf5xt5WKkPycdi2/i8gMAExHLId6WvTdKJEPO 6IeYJiTi4LkUh28Kz8V1ZtoJk5GR2AOMaH4dylx+RG9ciiVU6xLpsTBwXW0DXg8585xa WTtVT/RYZPBUOOllX795g4kb/jHjWVGvesmzB7HjnH3xt8TUDZxI5Cte4vGw0SPeggnr Xif5u1z6eU98y4WoUP5QcO6Pvx7E5iIUd9COgulIFp74WKkdl5+qzVWYvf8S1pN7HCP9 h2uw== 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=7diEQdukoqCSV/Ord4kqC5aBKutrfMQfvn4l3kYqiKw=; b=vn4eGH7grkhOSoWbrU1WrzPR/Xjax7Z0MDV6gDYIN6TOT0dS+RM5BG2SQohZ4YrQlG iszry62YcbKIWGFDSLzrMN+qr2AnYh/nW9AHVdOALdz1xckPxirwhxT1OlR3Jrnj8629 ipMTdra+oRM9o/q8JCpUucfzn+sDQ4ttqtuLSCqHKkPSlTF1fbHimwb5SmPBzbd9BT8u ohkca1Lvvs/Zysqx3tDL2Vm68kVctZbfkMrh7RpeyPIACIcgrScAywEP+xu5cfT+9LvK IKYyOVvpyjERwm2RHwJnyKfZRxuUbXn4if9O3NVkO7zK807vpL0bM2XJ9yhBM/n87u9O kj6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i/A9UyUX; 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 g4si5374078pgc.83.2017.11.18.19.57.09; Sat, 18 Nov 2017 19:57:22 -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=i/A9UyUX; 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 S1163401AbdKRJfZ (ORCPT + 93 others); Sat, 18 Nov 2017 04:35:25 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:46783 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162911AbdKRJeU (ORCPT ); Sat, 18 Nov 2017 04:34:20 -0500 Received: by mail-pf0-f194.google.com with SMTP id q4so3720517pfg.13; Sat, 18 Nov 2017 01:34:20 -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=7diEQdukoqCSV/Ord4kqC5aBKutrfMQfvn4l3kYqiKw=; b=i/A9UyUXCTQjuXg+eSAwIx/rCZmJ0v2FZUKrU/ZvPeGETJDUxu+AgW4wU0jvszF+Fv rWKgIFEgwZOAS5/IsQOb1hmMhX5odUqHoyfvsUEyHmyRh7NpgxWuwMVcuik8r6wp4itG Uj45WY7dKERhGbZEG+oM+UhLJsJdR5g51jDXgTq8S/fCefnHyc2+ICb0+VeX5ZIReL98 MHYC81Hwib817poLBUbMKB2vEPR/rPldI3w1syJ6WD6SzF9zXLgjXyVYwQ+mlr2Amc+m EyyXcQWoP2wsIxrrlS5LAPxgEoi1ii4p7i3GLwmSKWSDEpvTCMgSUwiXRfV5oYO/nlSh UgzA== 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=7diEQdukoqCSV/Ord4kqC5aBKutrfMQfvn4l3kYqiKw=; b=lyAhNGrIramsnMIPQYw42hYOB9HuX6aQvxC/hfiFk5qYcLwUtjXXvZ5mdRiUj/FS5x H3fT9hFnBxObkSj0v5mdvXjI1tq0RSYiNKhiyvr/6lkPHBS25KmYy3en3Vm8rwCCCPQI gKanX32hwfSS4lzJb4MQBE6WVHf+kk1siUi34VuxejkrXXsYFmkHIZD/QnA7BtDZV0K4 HtPvtgD0RpRC1keGHQZdBWrNnLqziZIStRAqWCUWdgXuxXx5PXIVRY0Eci/wS1wciGT3 yOEhc2nJypN8n9dEigZS6CnvGapS48WbMRPWX3LsW7LmsUY3vLO666E5DSaEN3w/aoRW yBlg== X-Gm-Message-State: AJaThX7DWkoecgQ8wlD/viwk8cnYkSTBwAX70QmDRe6ubhWMObZc1RkA 2PU6KUJ/8QFSRWrhoSWkpDE= X-Received: by 10.101.66.197 with SMTP id l5mr7765785pgp.240.1510997660091; Sat, 18 Nov 2017 01:34:20 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id y20sm11057079pgc.52.2017.11.18.01.34.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:34:19 -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 3/6 v2] mmc: sdhci-acpi: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 15:03:45 +0530 Message-Id: <293914dcf01ddafb7669ab0212c8651071be95c9.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 platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. drivers/mmc/host/sdhci-acpi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index b988997..dd8129e 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -566,6 +566,10 @@ static int sdhci_acpi_probe(struct platform_device *pdev) host->hw_name = "ACPI"; host->ops = &sdhci_acpi_ops_dflt; host->irq = platform_get_irq(pdev, 0); + if (host->irq <= 0) { + err = host->irq; + goto err_free; + } host->ioaddr = devm_ioremap_nocache(dev, iomem->start, resource_size(iomem)); -- 2.7.4 From 1587382143958953296@xxx Thu Dec 21 08:39:41 +0000 2017 X-GM-THRID: 1583659774662838914 X-Gmail-Labels: Inbox,Category Forums