Skip to contentSkip to conversation

metag-TCM: Delete an error message for a failed memory allocation in tcm_add_region()

PATCH New SF Markus Elfring 1 participant 1 message May 11, 2017 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 metag-TCM: Delete an error message for a failed memory allocation in tcm_add_region()

From: Markus Elfring <[email protected]>
Date: Thu, 11 May 2017 16:16:32 +0200

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

This issue was detected by using the Coccinelle software.

---
 arch/metag/kernel/tcm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/metag/kernel/tcm.c +1 -3
index 5d102b31ce84..6c9985591cf1 100644
@@ -115,10 +115,8 @@ int __init tcm_add_region(struct tcm_region *reg)
 	struct tcm_pool *pool;
 
 	pool = kmalloc(sizeof(*pool), GFP_KERNEL);
-	if (!pool) {
-		pr_err("Failed to alloc memory for TCM pool!\n");
+	if (!pool)
 		return -ENOMEM;
-	}
 
 	pool->tag = reg->tag;
 	pool->start = reg->res.start;
Signature · 1 line
2.12.3