Skip to contentSkip to conversation

staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()

PATCH New SF Markus Elfring 1 participant 1 message May 17, 2017

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

PATCH 1/1 staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()

From: Markus Elfring <[email protected]>
Date: Wed, 17 May 2017 19:01:10 +0200

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

This issue was detected by using the Coccinelle software.

---
 drivers/staging/netlogic/xlr_net.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/netlogic/xlr_net.c +1 -3
index 781ef623233e..864304eb5f36 100644
@@ -420,10 +420,8 @@ static void *xlr_config_spill(struct xlr_net_priv *priv, int reg_start_0,
 	base = priv->base_addr;
 	spill_size = size;
 	spill = kmalloc(spill_size + SMP_CACHE_BYTES, GFP_ATOMIC);
-	if (!spill) {
-		pr_err("Unable to allocate memory for spill area!\n");
+	if (!spill)
 		return ZERO_SIZE_PTR;
-	}
 
 	spill = PTR_ALIGN(spill, SMP_CACHE_BYTES);
 	phys_addr = virt_to_phys(spill);
Signature · 1 line
2.13.0