From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 27 Jan 2018 20:06:59 +0100
Subject: IB/usnic: Delete an error message for a failed memory allocation in
usnic_transport_init()
Patch-mainline: v4.17-rc1
Git-commit: b7c5bc73680dfcb1bdc3a1c77c0344f045ac017d
References: bsc#1103992 FATE#326009
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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/infiniband/hw/usnic/usnic_transport.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/infiniband/hw/usnic/usnic_transport.c
+++ b/drivers/infiniband/hw/usnic/usnic_transport.c
@@ -201,10 +201,8 @@ int usnic_transport_sock_get_addr(struct
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);