Skip to contentSkip to conversation

IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init()

PATCH Applied SF Markus Elfring 2 participants 2 messages Jan 27, 2018 – Feb 28, 2018

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

PATCH 1/1 IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init()

From: Markus Elfring <[email protected]>
Date: Sat, 27 Jan 2018 20:06:59 +0100

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

This issue was detected by using the Coccinelle software.

---
 drivers/infiniband/hw/usnic/usnic_transport.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/infiniband/hw/usnic/usnic_transport.c +1 -3
index de318389a301..2e9bba52a686 100644
@@ -201,10 +201,8 @@ int usnic_transport_sock_get_addr(struct socket *sock, int *proto,
 int usnic_transport_init(void)
 {
 	roce_bitmap = kzalloc(ROCE_BITMAP_SZ, GFP_KERNEL);
-	if (!roce_bitmap) {
-		usnic_err("Failed to allocate bit map");
+	if (!roce_bitmap)
 		return -ENOMEM;
-	}
 
 	/* Do not ever allocate bit 0, hence set it here */
 	bitmap_set(roce_bitmap, 0, 1);
Signature · 1 line
2.16.1
#1 lore raw
Quoted 10 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Sat, 27 Jan 2018 20:06:59 +0100

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

This issue was detected by using the Coccinelle software.

 drivers/infiniband/hw/usnic/usnic_transport.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Applied to for-next

Jason