From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] ARM: mvebu: checking for IS_ERR() instead of NULL
Date: Tue, 21 Jan 2014 06:52:16 +0000 [thread overview]
Message-ID: <20140121065216.GA31535@elgon.mountain> (raw)
of_iomap() returns NULL on error, it doesn't return error pointers.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.c b/arch/arm/mach-mvebu/mvebu-soc-id.c
index fe4fc1cbdfaf..b4cfbd62709d 100644
--- a/arch/arm/mach-mvebu/mvebu-soc-id.c
+++ b/arch/arm/mach-mvebu/mvebu-soc-id.c
@@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void)
}
pci_base = of_iomap(child, 0);
- if (IS_ERR(pci_base)) {
+ if (!pci_base) {
pr_err("cannot map registers\n");
ret = -ENOMEM;
goto res_ioremap;
WARNING: multiple messages have this Message-ID (diff)
From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] ARM: mvebu: checking for IS_ERR() instead of NULL
Date: Tue, 21 Jan 2014 09:52:16 +0300 [thread overview]
Message-ID: <20140121065216.GA31535@elgon.mountain> (raw)
of_iomap() returns NULL on error, it doesn't return error pointers.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.c b/arch/arm/mach-mvebu/mvebu-soc-id.c
index fe4fc1cbdfaf..b4cfbd62709d 100644
--- a/arch/arm/mach-mvebu/mvebu-soc-id.c
+++ b/arch/arm/mach-mvebu/mvebu-soc-id.c
@@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void)
}
pci_base = of_iomap(child, 0);
- if (IS_ERR(pci_base)) {
+ if (!pci_base) {
pr_err("cannot map registers\n");
ret = -ENOMEM;
goto res_ioremap;
next reply other threads:[~2014-01-21 6:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 6:52 Dan Carpenter [this message]
2014-01-21 6:52 ` [patch] ARM: mvebu: checking for IS_ERR() instead of NULL Dan Carpenter
2014-01-21 8:24 ` Gregory CLEMENT
2014-01-21 8:24 ` Gregory CLEMENT
2014-01-21 8:43 ` Dan Carpenter
2014-01-21 8:43 ` Dan Carpenter
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=20140121065216.GA31535@elgon.mountain \
--to=dan.carpenter@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.