Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1720681 > unrolled thread

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

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-08-26 19:00 +0200
Last post2017-08-26 19:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: netlogic: Delete an error message for a failed  memory allocation in xlr_config_spill() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-26 19:00 +0200

#1720681 — [PATCH] staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-08-26 19:00 +0200
Subject[PATCH] staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()
Message-ID<uiMBb-3BN-3@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 26 Aug 2017 18:44:12 +0200

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

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/staging/netlogic/xlr_net.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index e05ae4645d91..04cdcf3f329f 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -423,10 +423,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);
-- 
2.14.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web