Skip to contentSkip to conversation

ARM: mvebu: checking for IS_ERR() instead of NULL

PATCH In review Dan Carpenter 2 participants 3 messages Jan 21, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mvebu: checking for IS_ERR() instead of NULL

of_iomap() returns NULL on error, it doesn't return error pointers.

arch/arm/mach-mvebu/mvebu-soc-id.c +1 -1
index fe4fc1cbdfaf..b4cfbd62709d 100644
@@ -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;
#1 lore raw
Quoted 2 lines · Dan Carpenter

of_iomap() returns NULL on error, it doesn't return error pointers.

Hi Dan,

Thanks for your patch but I already sent this fix yesterday and Jason have applied. See: http://thread.gmane.org/gmane.linux.ports.arm.kernel/295642

Thanks,

Gregory

Quoted 21 lines
arch/arm/mach-mvebu/mvebu-soc-id.c +1 -1
index fe4fc1cbdfaf..b4cfbd62709d 100644
@@ -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;

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw
Quoted 9 lines · Gregory CLEMENT
Quoted 2 lines · Dan Carpenter

of_iomap() returns NULL on error, it doesn't return error pointers.

Hi Dan,

Thanks for your patch but I already sent this fix yesterday and Jason have applied. See: http://thread.gmane.org/gmane.linux.ports.arm.kernel/295642

Cool. Congrats to Ezequiel on his new corporate email address. :)

regards,
dan carpenter