From: Markus Elfring Date: Sat, 27 Jan 2018 19:06:59 +0000 (+0100) Subject: IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_i... X-Git-Tag: v4.19~1272^2~171 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7c5bc73680dfcb1bdc3a1c77c0344f045ac017d;p=platform%2Fkernel%2Flinux-rpi.git IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init() 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 Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/usnic/usnic_transport.c b/drivers/infiniband/hw/usnic/usnic_transport.c index de318389a301..2e9bba52a686 100644 --- 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 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);