Received: by 10.223.164.202 with SMTP id h10csp2350419wrb; Sat, 18 Nov 2017 19:57:40 -0800 (PST) X-Google-Smtp-Source: AGs4zMbdWAcCPfTfgwQrccZApJbjj9oFhvvU+Ij0wNDKfGBA3Jsi2og1EKTsT/FFCOVVsPmEPy19 X-Received: by 10.98.80.208 with SMTP id g77mr7024508pfj.201.1511063860574; Sat, 18 Nov 2017 19:57:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063860; cv=none; d=google.com; s=arc-20160816; b=R5OtKqE0ev3VR3eD9rcLpQobhTjd3d1rIUXWGPVqZJ6VbtIkOXG7cPph8AU46UZdwG h+8NwPCmdk2MPez9ZMgi9YO4b6c+JPZXYzbuTnPjV1ySlsi3rdLjPMlYCU1+yL5pdwns yIIr8gVO/nsjqaD8Z+Og7RlbbEtMmW7uQNbBxvzFnR36/NkBpZ0pC8y703amcQlRhooM at7D74ZVZlFfp8v8ffIeh5QS+vBZuy7eEBgf1uRXfx4obPZR/vYAFu4cWzhkLbbmT4y9 CcMU1As/7kHF9AS3e3ci9Y0lTu1GeB1Q8qcXmCBVReKjqVvPMNzfQn2T0t33Jw3n8d+4 tStQ== 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=4vOcORNargIeGcZ6+TNWqh9eEWXI6i4yaqVVlLR8FeI=; b=X5wqFj43hYEA1EsZS9p1itRp6BCQf2WFexQkv9aPmGBK5YME0Lnp8Z1fSB7K7iBxDQ dD/jsrSX3ZoBVFprVQIlBqJlC6HPmpLujtrkGQ4j79fuhQmIL9v3of0PUgDKq1Yplj76 r5JRPSPHdMw59QpFlQ2QFUOhly18rtserfZ2iEcgbcYAYPW3F+YIl4xcy166KHpsudgd FPBcGds3nAlmUn6dooBb5KKhAm6RufLJbzH0APaIYznX8NpoMN+8cn3Bbl6dW4zKCbvm T+TfWC/egReVZtrzzHXTCTvO1ARFshEJG5pa7Jfe89HJWWB31RouQ9WocmHm3qQbCUNm nFXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JrvQjiR7; 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 f68si5436224pgc.400.2017.11.18.19.57.27; Sat, 18 Nov 2017 19:57:40 -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=JrvQjiR7; 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 S1163417AbdKRJfd (ORCPT + 93 others); Sat, 18 Nov 2017 04:35:33 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:37322 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163220AbdKRJeZ (ORCPT ); Sat, 18 Nov 2017 04:34:25 -0500 Received: by mail-pg0-f65.google.com with SMTP id o7so3754289pgc.4; Sat, 18 Nov 2017 01:34:25 -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=4vOcORNargIeGcZ6+TNWqh9eEWXI6i4yaqVVlLR8FeI=; b=JrvQjiR7OB+VWSdA7av8hJbJXEh5lSKq+LNV5wBWTetgExtazZQ6kaR6AsYHW4SlRl PjcuV/GXDN6yimwb/mHVZDDQikLOqENbcdTTJ//Eov6FJTsW6Vc3/J6pAJc4v+20xJAl AsjfJ5o7isLSbKHjHvf29XVr8N9eMdNxNfAvfOoEdpnoBgX1hhK2aJzjLh1r1Jx6lU5t KPthAouDu9qlp2fYWv7io1094mG86XkDTFMM68nUoxJN5dRLedIrCzLdYgsXeaRBgbxl wYBnOkG5mfrM2wLWR2iOAN++ozHHGWq61lq5G1GYQ2iJGTOuRY8vDzBhbjxetOc6EwoJ zm+g== 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=4vOcORNargIeGcZ6+TNWqh9eEWXI6i4yaqVVlLR8FeI=; b=Ly4h4BhOXUGVF4KkGumYOWTqN2/XugfyqM3g2F9BuuqQAKZHaShFiv4JvbiA+CWXW+ k/MyNbDwGGwFiHmpDmaeOSUGLZYdepm05b1J9Cd4rUEf0ojQOEvz0owFhJI9BVlJ0WuP xOMf8XgTI8cA8mS2MZ6kKt+1L2Z0k5G67fiYxewAzDXUBKPVTnBN0OvW75UxxeN3u1/L kUwA2GjH4nK/6ITk30h/AtKhD41+eQPQNfPe7g6TluaTGoio25s9tE/hzwypzMwYpwAX PC/kFOw/7xuHoXwOVYkyOA5+mCvFWRj/K+SiF7tst1RBb+ZQA/Xu68XOWDMQuIqFVt03 QH1Q== X-Gm-Message-State: AJaThX766vErxY5TUk2F0W3Nkh3lqt6v5S+L+KWqlWg9D1R7ZBUSXnSQ VrZ5R9jRC5Gxf1Ikq7k7mqE= X-Received: by 10.84.128.197 with SMTP id a63mr7879873pla.212.1510997665231; Sat, 18 Nov 2017 01:34:25 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id y20sm11057079pgc.52.2017.11.18.01.34.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:34:24 -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 4/6 v2] mmc: sdhci-spear: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 15:03:46 +0530 Message-Id: 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-spear.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index 8c0f884..900838b 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -82,6 +82,10 @@ static int sdhci_probe(struct platform_device *pdev) host->hw_name = "sdhci"; host->ops = &sdhci_pltfm_ops; host->irq = platform_get_irq(pdev, 0); + if (host->irq <= 0) { + ret = host->irq; + goto err_host; + } host->quirks = SDHCI_QUIRK_BROKEN_ADMA; sdhci = sdhci_priv(host); -- 2.7.4 From 1584562249422088781@xxx Mon Nov 20 05:38:40 +0000 2017 X-GM-THRID: 1584219345847479054 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread