Skip to contentSkip to conversation

net/ncsi: Delete an error message for a failed memory allocation in ncsi_rsp_handler_gc()

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

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

PATCH 1/1 net/ncsi: Delete an error message for a failed memory allocation in ncsi_rsp_handler_gc()

From: Markus Elfring <[email protected]>
Date: Sat, 14 Oct 2017 18:03:11 +0200

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

This issue was detected by using the Coccinelle software.

---
 net/ncsi/ncsi-rsp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/ncsi/ncsi-rsp.c +1 -4
index 265b9a892d41..eb3611ffbb62 100644
@@ -686,11 +686,8 @@ static int ncsi_rsp_handler_gc(struct ncsi_request *nr)
 
 		size = sizeof(*ncf) + cnt * entry_size;
 		ncf = kzalloc(size, GFP_ATOMIC);
-		if (!ncf) {
-			pr_warn("%s: Cannot alloc filter table (%d)\n",
-				__func__, i);
+		if (!ncf)
 			return -ENOMEM;
-		}
 
 		ncf->index = i;
 		ncf->total = cnt;
Signature · 1 line
2.14.2