From patchwork Tue Oct 21 10:33:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varka Bhadram X-Patchwork-Id: 5112531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8802C9F349 for ; Tue, 21 Oct 2014 10:40:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBDE62015E for ; Tue, 21 Oct 2014 10:40:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FA6F2012F for ; Tue, 21 Oct 2014 10:40:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgWoK-0006ws-Eh; Tue, 21 Oct 2014 10:37:04 +0000 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgWoD-0006tA-4t for linux-arm-kernel@lists.infradead.org; Tue, 21 Oct 2014 10:36:58 +0000 Received: by mail-pd0-f173.google.com with SMTP id g10so1086367pdj.32 for ; Tue, 21 Oct 2014 03:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XvFDNRllHL9vhERD6XtyAaujJ01ayOAzbQsm/cJmwUo=; b=qCMBsl8hWlEkYM8/cO4WpGSwh0LVCTN2/HBx3WGYZwUmLl+LPYgafFkxt226UBF5Su lauo8A7W6UcRea3acujnH0uuwb4S4rdZS+HLiNX1OLOeU4YAMGOW9TW/tueCwTcQfMnR su6oQ9RpA5JzBhZwLVzAv2ud6NYKySaCQYXegRAZkYYLFddcYBwxRdoCRbcVspt/Tk1H 0y2ZGCGEnK03Yheax1ij/Ie19lpVqCaeh2sssgkCFGhK+9gT7fDp01WKL9OlsuI+tO5C hFcPD42cVIisCdu6axPUGIugF392N2m4UH4pGMPDPWYuFJIQ4eUDweqSuGmfZTCX4byO mz/w== X-Received: by 10.70.126.40 with SMTP id mv8mr33262496pdb.109.1413887796333; Tue, 21 Oct 2014 03:36:36 -0700 (PDT) Received: from cdac.hyderabad.cdac.in ([196.12.45.164]) by mx.google.com with ESMTPSA id va2sm11681985pac.15.2014.10.21.03.36.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 03:36:35 -0700 (PDT) From: Varka Bhadram X-Google-Original-From: Varka Bhadram To: linux-arm-kernel@lists.infradead.org Subject: [PATCH arm-soc 1/2] mach-omap2: gpmc: remove duplicate check on resource Date: Tue, 21 Oct 2014 16:03:31 +0530 Message-Id: <1413887612-25012-2-git-send-email-varkab@cdac.in> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413887612-25012-1-git-send-email-varkab@cdac.in> References: <1413887612-25012-1-git-send-email-varkab@cdac.in> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141021_033657_207421_6964423E X-CRM114-Status: GOOD ( 11.06 ) X-Spam-Score: -0.8 (/) Cc: Varka Bhadram , linux@arm.linux.org.uk X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram --- arch/arm/mach-omap2/gpmc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 9f42d54..ff5c4d6 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1653,16 +1653,13 @@ static int gpmc_probe(struct platform_device *pdev) struct resource *res; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) - return -ENOENT; - - phys_base = res->start; - mem_size = resource_size(res); - gpmc_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(gpmc_base)) return PTR_ERR(gpmc_base); + phys_base = res->start; + mem_size = resource_size(res); + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (res == NULL) dev_warn(&pdev->dev, "Failed to get resource: irq\n");