Received: by 10.223.164.202 with SMTP id h10csp1571212wrb; Sat, 18 Nov 2017 01:37:02 -0800 (PST) X-Google-Smtp-Source: AGs4zMY5Sibcg65V77LNz2KALA/pkQi92Yqllgi6g6oKkcV6v39NnWX6XTzP7J1ydIpr/kD14gBM X-Received: by 10.98.62.221 with SMTP id y90mr4857009pfj.71.1510997822372; Sat, 18 Nov 2017 01:37:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510997822; cv=none; d=google.com; s=arc-20160816; b=V1kmZTnF4BpUhe24XGfRi9O3ud4kO2Ipbm/AVuNeCIlxIl0KxotWDJbumymth0H63r mUV0Ha/xLxC5lyTl/oDcliRWSMpUS/yUVZrmQ3L3H8DnVCKo2hIFs8j1wiJb6M5uLV/m WGNYqP+ECZIzVHMx8yY7OkJ1juwO0gk0G9g0UZmkKfxFXWcnYBbY9GjbYDOPDQYMApl5 6DcEDYn0iUtGgKj0SnDYbODb66fnY4C9YKv0+CXO8RCuVJaocYgjM5cSZ2UB58f6wOxc 0S75hh+7GXEyuifj6Gdo8Rxs1O81HgOlR75P7g1DFipH6viWH3IFBi6V3yq4bMZyaE3E Gq1g== 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=cUvtK7BSgYtw/2Wq132OAJRYAlqXYs4n8lSfq0ClpyQ=; b=XKdHApcHCwcNTuUYJcc1ve7b6XuiOCVMPgdLAcqnE4DvISAZ9NbbZlQrscfOJR1htX 8+84UT8wLupPjPmrPeg/zPyKCAqya78V+dhJ0K7BSDW77K0m8dHvb9Wg4cQw+v3WnbVt BEwrVYjeNIzuLxZStRxJI35tTJalEbhKcJZiP1HtIpaLKSCvyguL8D7zsx92lYGVHQOV QDtytqCBdDrLMARWBj6Op4H4U78KoIswsm47+6N2Tdw09mmkCd8br5kaJtwatRVkA3we /jnq6vvMDrupX+ttfHXzie8Hd2Nx8vq3LUdfV+ZCf8l95/ZckJMX6dlPnygkJ3V+fQue i1UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yj/W3fFW; 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 w16si4208083plp.765.2017.11.18.01.36.49; Sat, 18 Nov 2017 01:37: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=Yj/W3fFW; 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 S1161845AbdKQU32 (ORCPT + 93 others); Fri, 17 Nov 2017 15:29:28 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35385 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761045AbdKQU24 (ORCPT ); Fri, 17 Nov 2017 15:28:56 -0500 Received: by mail-pg0-f67.google.com with SMTP id l19so2747277pgo.2; Fri, 17 Nov 2017 12:28:55 -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=cUvtK7BSgYtw/2Wq132OAJRYAlqXYs4n8lSfq0ClpyQ=; b=Yj/W3fFWGWZtiNdJTImDfjEvPObsJHfm422Lgjrdv/MRlNyTLb4BOIIIp30Cxhxr8+ lgR4mxkaimP2b15IzGDrRP63d2wEvuyWVJgTV0nBTrhPo9FZNXv4sHZiezatPJ/ZuN3o JFI59WkGS/k9sGfSDoKCOFBhlR0FgxTNwrsMB03noPqb1RtAaIJkRo2TUNoRyOKImnqU EKzZxHs2dITIpUvOTCUfZDvIctcmqzmpYztZkMQQIwKLFwNgBkiY3fqf0XxgfLGWE+sh +nrddgSovXyfjVKsvisLekDgWUE5nblx5/3rrAHB+iLVHDZSpCbQR/9o33Zt/zfgBDC5 xGgA== 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=cUvtK7BSgYtw/2Wq132OAJRYAlqXYs4n8lSfq0ClpyQ=; b=tcikGO9JSbAoTNWneQLICNT1R/xdF9p9s7rJotxUvPiydBWXpHNPDuD0zypeSRLnXr Glx492SWipslqqDVGU9AOC72MdZCzFCWftQdCmxwkXb43uAIm0cOK2JwXm3beot4CfHz zA3h3ZXFCFF7iQj+yi6/WT7y2taruZPoHlJRQ0lY16r8OZrKVkL1mYya5QQG3VqZ+wAB L0sTgeOZtssQRjjFa9EKvWfGdiWGs5x7R2EUHcm85SWE7C0rA+YfFrNVJM+M018atovH qTy4J4TWM1jpFssKE8+jWgWClwcScVQEZ/TM4/KSAIBlWJGGtaTouzWVr3tFtNDsbgQa widw== X-Gm-Message-State: AJaThX7RFTUEk/su1nWpCwnKwCNPt8WWVYmATewvioLmT40cwh/4PR5N Q13jZ9JbLjdMxNm55G2YaxPQYcK9 X-Received: by 10.84.229.137 with SMTP id c9mr6469329plk.389.1510950535551; Fri, 17 Nov 2017 12:28:55 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id n72sm9382740pfg.109.2017.11.17.12.28.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 12:28:54 -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 6/6] mmc: sunxi-mmc: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 01:58:22 +0530 Message-Id: <1510950502-22565-7-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 platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/mmc/host/sunxi-mmc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index cc98355d..ec2a16b 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1255,6 +1255,11 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host, goto error_assert_reset; host->irq = platform_get_irq(pdev, 0); + if (host->irq < 0) { + ret = host->irq; + goto error_assert_reset; + } + return devm_request_threaded_irq(&pdev->dev, host->irq, sunxi_mmc_irq, sunxi_mmc_handle_manual_stop, 0, "sunxi-mmc", host); -- 2.7.4 From 1584421201319541605@xxx Sat Nov 18 16:16:46 +0000 2017 X-GM-THRID: 1583981608160833190 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread