Received: by 10.223.164.202 with SMTP id h10csp2349900wrb; Sat, 18 Nov 2017 19:56:46 -0800 (PST) X-Google-Smtp-Source: AGs4zMYMcsTiG6DbLlJlH76/eXVccNnKfAvEUos618BKG1AqGglbGA4zYkN5cN0XTeDxoeyeDUvc X-Received: by 10.99.117.83 with SMTP id f19mr9379147pgn.255.1511063805943; Sat, 18 Nov 2017 19:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063805; cv=none; d=google.com; s=arc-20160816; b=Ixc3Gy6QxBhGBIZCHUBQelHfYpZYpGQtwqZc8T9NEQCtds37lhRrQ+vOTdH6zAdSEg 1mTE6BgQN3JABTlsfGyTbxRc2694TBkIo8N6TKb8rlTR7xyZnTAbvrn89eJ/AfJ3JPoj 0Cugl/+EkzvAD0cpdW1D80wEZ2EnS1igDfnXytom2zjmhRa2ucEsKUeWWCaHrJzJiBPV SCiZbI1vcj1BhsuKpgapLJznBYqcsIzBsV0c4iHTZSxe5uQDpbtgKOEvvvyeEv6XnEfW 9CAOv7Apg+9TSZJt5t1YFUcYh8Y/0cIcu8DgxFTa2sPGvYhAJS0VMzlXEvVMRxR0FQ+P 4Kbw== 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=Xz8EpN6YKCYpecnUoVD74o3uYtDvnulQicp3AhST55A=; b=QTa6cO1eYctpuJ9lcPG/J5bsVWl5wTvIZEnDFPDIleau5+f54AQgi2w0MsogdD0xOk jM+CfQXOUgaF6kDvTUh04BgSR76bgn2fhNUTXDkoddn05EMMZ/B204b5W+7AZ46beb/B U/8Fbwb8bHqCq53oU0263voYKkOQIe1v5294DSE3NoiGfJMz1aIY9zv7OV/QA9DsZEoV 4C5+QyVUSR7sW4Vv6uPfEGueSFE3U0/bE1n0hgTThIUyOICoQROmlnno+EcBG0Gg5fIK +pPFW7HsMer/Nf8WfwtQcilxjYkA+8a8SSlYYOyBnshYoj566PIC9+oPE48QBR03UtRd 2NEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WnXQ3/AQ; 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 d30si5468627pld.506.2017.11.18.19.56.33; Sat, 18 Nov 2017 19:56:45 -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=WnXQ3/AQ; 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 S1764372AbdKRJgP (ORCPT + 93 others); Sat, 18 Nov 2017 04:36:15 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35945 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163308AbdKRJef (ORCPT ); Sat, 18 Nov 2017 04:34:35 -0500 Received: by mail-pg0-f67.google.com with SMTP id t10so3758175pgo.3; Sat, 18 Nov 2017 01:34:34 -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=Xz8EpN6YKCYpecnUoVD74o3uYtDvnulQicp3AhST55A=; b=WnXQ3/AQvk0DiVyGXnAGsq5LOY/j/Z/iKGdhiSidE8oMGOOB0jowmwqDhMbrA3NAfZ suIGR0iu0iMrG9kv9StxM/6C1sk4GfwRPSg7KosX7i9hq6RYWI7PamJe4BZFcNEtNziM 3Fqw9TqV4Xctu8xRuA/S0YXD/yBo0QHU5i3jCs876htd06aBw9ttGUSucqa+s+Nfs2Ch g3RafSroXIj6ODeb5FscPxGfjM9P7rS3lj7lWbdDzPquSvte5ojXZUde8j+MUT+FLZ2t Pa/kJ9RoZGIR4mzFeO0ai3trKIgAPBMgX0k4E+UsUfHyedjHDfvpH0E5/MXS/ZdrX+Kt cJrw== 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=Xz8EpN6YKCYpecnUoVD74o3uYtDvnulQicp3AhST55A=; b=gHpVjQw9BIwRvfIl+QbLY1F/BZn9jPFs7wG0F54yR2RP+yd9L9f7SzHs4jRcWoeACw P8x22QAjtOkdtCd7C1Tipwt6cHvmdhkNNyOrVociZymC/eKQkSdi1EhLI/8nbPNKfI2k 5r/+pJlwPgBKjjyZzXH8rWqr3a+AqQjR8BAMxvByUF17iSqTmromXoofl4RnpVzx7+9q 7/rIpx377hMxOSifMPnzU8Pm2X0b/zxFitAzmdNdo6y/5y14Vd3tIHzDghJ4tVvV/4dK 9M4tJxZD0ApVZ+1F9XsYe4UleXleMqkNTWJKvWt3A18hUqXG2gf61k5lNlytQSb7MomR hDsA== X-Gm-Message-State: AJaThX79A5nOw2LdtdvzRWdoZl5vgg+PTOaIcrem0shTwAOU34u+zC/L gYkIFwzxXZfUi4I4aexHWuo= X-Received: by 10.101.91.78 with SMTP id y14mr7755473pgr.220.1510997674593; Sat, 18 Nov 2017 01:34:34 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id y20sm11057079pgc.52.2017.11.18.01.34.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:34:34 -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 6/6 v2] mmc: sunxi-mmc: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 15:03:48 +0530 Message-Id: <27a6d3a22516b3711b48bfbf305b6d8f3960eeac.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/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 1585132247573597132@xxx Sun Nov 26 12:38:32 +0000 2017 X-GM-THRID: 1585132247573597132 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread