summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2014-01-20 15:59:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-13 13:55:30 -0800
commit930deb9852d7cb29be1a9836723ddd86946c0b0a (patch)
treed4cc722e577f81f7be2334ada54b30801ee40fa6 /arch
parentc588a2e83c793ddf4811c57a347916ddccb7060a (diff)
ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed
commit dc4910d9e93f8cc56b190dd8fc9e789135978216 upstream. When pci_base is accessed whereas it has not been properly mapped by of_iomap() the kernel hang. The check of this pointer made an improper use of IS_ERR() instead of comparing to NULL. This patch fix this issue. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Reported-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support) Signed-off-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mvebu/mvebu-soc-id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.c b/arch/arm/mach-mvebu/mvebu-soc-id.c
index fe4fc1cbdfaf..f3b325f6cbd4 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 == NULL) {
pr_err("cannot map registers\n");
ret = -ENOMEM;
goto res_ioremap;