Skip to content

Commit dc4910d

Browse files
gclementJason Cooper
authored andcommitted
ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed
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> Cc: stable@vger.kernel.org # v3.12+: af8d1c6: ARM: mvebu: Add support to get the ID and the revision of a SoC Cc: stable@vger.kernel.org # v3.12+: 85e618a: ARM: mvebu: Add quirk for i2c for the OpenBlocks AX3-4 board Cc: stable@vger.kernel.org # v3.12+: 6cf70ae: i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs Cc: stable@vger.kernel.org # v3.12+: f8b94be: i2c: mv64xxx: Document the newly introduced Armada XP A0 compatible Cc: stable@vger.kernel.org # v3.12+ Fixes: 930ab3d (i2c: mv64xxx: Add I2C Transaction Generator support) Signed-off-by: Jason Cooper <jason@lakedaemon.net>
1 parent 77dfdeb commit dc4910d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/mach-mvebu/mvebu-soc-id.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void)
8888
}
8989

9090
pci_base = of_iomap(child, 0);
91-
if (IS_ERR(pci_base)) {
91+
if (pci_base == NULL) {
9292
pr_err("cannot map registers\n");
9393
ret = -ENOMEM;
9494
goto res_ioremap;

0 commit comments

Comments
 (0)