From patchwork Sat Jan 27 19:15:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10187627 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7078602C8 for ; Sat, 27 Jan 2018 19:15:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC121289F0 for ; Sat, 27 Jan 2018 19:15:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF21E28A77; Sat, 27 Jan 2018 19:15:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80AB3289F0 for ; Sat, 27 Jan 2018 19:15:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbeA0TPb (ORCPT ); Sat, 27 Jan 2018 14:15:31 -0500 Received: from mout.web.de ([212.227.17.12]:53747 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751732AbeA0TP3 (ORCPT ); Sat, 27 Jan 2018 14:15:29 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lb25F-1f3sHX3Ncn-00kfx6; Sat, 27 Jan 2018 20:15:18 +0100 To: linux-rdma@vger.kernel.org, Christian Benvenuti , Dave Goodell , Doug Ledford , Jason Gunthorpe , Roland Dreier , Upinder Malhi Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init() Message-ID: Date: Sat, 27 Jan 2018 20:15:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:BEMsbLJXQy+Rp0wEUUn3z3jhRPstei8lh+52XWbrPc7WRVIDDdP gRVXEinMvbUfwSB2HtNAD2qWUsDXtIq2pgapu/U+kXkk0UT6GOKjSd3/19sIPMkT9gAqLGS LpVNY1VQ4dM+zG9pLrqabpzBmxGiHdXIuxYGLM6pXLysnITnPfwfr7ZpdzxyHdArtRoGioU vfuTgB4lQOpUnQn8U1d/A== X-UI-Out-Filterresults: notjunk:1; V01:K0:tTVwXECeyDQ=:jInUXUxmgRi5wYolZaa1Q2 za+xNCW3JvWVI+ZvtcOAX1E7lQQ2TYw4PZLA0lVa4dSlrw8EkKOxXxGuqVy6UbMLaRIt6ZX5L 0nqYr8NhQOvULL5h/bMnw71WMm5zevhuyRYdoXvDg/0zEw2zffoR235WRJRkrGtAHX/LdkkQA kYX02vAzbeydhHm/qbZGWVA3AvhLWFF3QbGNXVEWFMQfpvv/0kcLSHCt1xkeg04YEWOSJf2BG 0ovIDN+75q2iyQQtqeIi9iIwLHZDsQp+JQVp+oovaHn6UHdGhPuPhqIu/+gfHnfLenZwXkx3q m1y5F1nZGYA401Q9jN2WVNT+yLClcMLfh1jOJpzsAilDsYsfYUxyRnOkqOI1lF7hEYx+iFFFx SA5fZJQLh1Z4x1Rmfiw+rwA9Nk9VFYTvvZWAjPy05sOIIAhapFImhAaB87ClDqo2lZXj175Xk 57nkebuzK8rdA0q4r6vEnYciMeXKlg2YMkS0z5jvWs/6z2BoA7lr4s6uNLBJ6HQw7MWlZNJT9 U6+Ez3YCjEIWKqJp7c1G+9Re4auhPMOFp1t5Qevd8wlIW51T8MUE+EzY72CVXcC92GNVf6FM8 cFn8UfRjhXowqTqdBK9jFYesO0wXmqECk3QsFHQ4CgitjQuYPvT+O0wsVvF2P1q1WGvm5r+sM TdUWdpYofs5xFk9Go/uAAAAl/DQCptvyGxZwDTUra5v8+Z/msKyj4CwIx1AoejKD/BCN+XCOt Gu+vf4zofZiGQUXzwKDWFFM13jMEnEWZ6Hxa27W54mqz0TyfGiYhKgqzpWg63N1cknOtAudm3 tS9rGmoGFs6JqGGUgeXtwPkkSIl1v4n5X/c4+YsWL4gwIEICiA= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring 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. Signed-off-by: Markus Elfring --- drivers/infiniband/hw/usnic/usnic_transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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);