From: varkabhadram@gmail.com (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 [thread overview]
Message-ID: <1413887612-25012-2-git-send-email-varkab@cdac.in> (raw)
In-Reply-To: <1413887612-25012-1-git-send-email-varkab@cdac.in>
Sanity check on resource happening with devm_ioremap_resource().
Signed-off-by: Varka Bhadram <varkab@cdac.in>
---
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");
--
1.7.9.5
next prev parent reply other threads:[~2014-10-21 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 10:33 [PATCH arm-soc 0/2] remove duplicate check on resource Varka Bhadram
2014-10-21 10:33 ` Varka Bhadram [this message]
2014-10-21 10:33 ` [PATCH arm-soc 2/2] plat-omap: dmtimer: " Varka Bhadram
2014-10-28 4:58 ` [PATCH arm-soc 0/2] " Varka Bhadram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413887612-25012-2-git-send-email-varkab@cdac.in \
--to=varkabhadram@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).