Skip to contentSkip to conversation

ARM: footbridge: Delete an error message for a failed memory allocation in dc21285_setup()

PATCH New SF Markus Elfring 1 participant 1 message Oct 2, 2017

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

PATCH 1/1 ARM: footbridge: Delete an error message for a failed memory allocation in dc21285_setup()

From: Markus Elfring <[email protected]>
Date: Mon, 2 Oct 2017 18:36:56 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 arch/arm/mach-footbridge/dc21285.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/mach-footbridge/dc21285.c +1 -3
index 96a3d73ef4bf..e40c78358b16 100644
@@ -258,10 +258,8 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)
 		return 0;
 
 	res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
-	if (!res) {
-		printk("out of memory for root bus resources");
+	if (!res)
 		return 0;
-	}
 
 	res[0].flags = IORESOURCE_MEM;
 	res[0].name  = "Footbridge non-prefetch";
Signature · 1 line
2.14.2