From patchwork Sat Jan 27 18:18:47 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: 10187593 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 58A20602C8 for ; Sat, 27 Jan 2018 18:19:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46A7428C26 for ; Sat, 27 Jan 2018 18:19:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A2B228C95; Sat, 27 Jan 2018 18:19:09 +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 D49B128C26 for ; Sat, 27 Jan 2018 18:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753230AbeA0STG (ORCPT ); Sat, 27 Jan 2018 13:19:06 -0500 Received: from mout.web.de ([212.227.17.12]:51073 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753193AbeA0STF (ORCPT ); Sat, 27 Jan 2018 13:19:05 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LcgZv-1f5WUY0fOp-00k85E; Sat, 27 Jan 2018 19:18:49 +0100 Subject: [PATCH 1/3] IB/iser: Delete an error message for a failed memory allocation in iser_send_data_out() From: SF Markus Elfring To: linux-rdma@vger.kernel.org, Doug Ledford , Jason Gunthorpe , Or Gerlitz , Roi Dayan , Sagi Grimberg Cc: LKML , kernel-janitors@vger.kernel.org References: <00e8b16f-c856-8999-fe93-2724a2f6a56e@users.sourceforge.net> Message-ID: <8dc6dc89-c77f-513d-70d3-11bcf963a539@users.sourceforge.net> Date: Sat, 27 Jan 2018 19:18:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <00e8b16f-c856-8999-fe93-2724a2f6a56e@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:mvFfqHnncPlMJavSqMhGPwpwgl1onaQEylvTg5Bf65Dj26nUTkq dC76zPzRm0whvklly0p711BGofwWo1UVk8xsAJF0s1Z+7ImwrmEznPvz0Z9aenjSz/yYvAE s2HNMqh7/O6MQu43teedf80OUlE0G8b6Y7YEB/snVszKavC5MwBLMhA9Wj2l5Z5leXsxgHW 9AHqE7k/8lMdq/N+iB4Lw== X-UI-Out-Filterresults: notjunk:1; V01:K0:5HBMetp/evg=:Y9S1gvwl9Y5bvmjTkGbKIZ crRMHl1H0cOFxlTpDNq6lD0PuVRhVxxZQaFhRYlCYHWCwucxtaNS7Hg7myCn3zIVUtUW3c1fs N0ELrCyaNrbvDbhDA9K3pgQqbD0OEJmFcHdLyrXDjlGNClNzDkrDVLpxg3Vx1ECH124IG1KB9 ihdOO6c+JKWr5nlVxNmgQ2HfPTkQmFPWJXy+bgaQPs6eTwATF6DWpucYxGxxtwU86iPS96OZc Bj/Pycd1/11Qw2MNrvmMsUXSZbHiToGKI8y/1HUqIcGUXf4K/iuikcKGvObgC7M04U49HNGjU KoHeI7lafX4uulPMxwe4vkEMxjauNvGkC1idA6qfpLB/NmCOK+Oz2044nL56lRzliIxOSz2eD RbB7S1ZjlG9oxoltQWFGy+5j88css1PYBPpoCe2e6siAXi16Q/SW4kbxl5ZfNpXmCcqBhAUI0 4fk3FL7zI0sqSfPs+Lzo7lFXk0RbFflxMmOfC3w41xzKhgZ38TFnPGQUDjcscXMh+6Owt/8zb cjS2cNan0PHwgpJKSpBD7VOKl4kAuJ42WHTFQ6WSO7EZr2WT3y6RGBdP1dQqd/+ZOkClOS7eR jsTi0Tkc+dGMDPgHjS7FNDq5lKmaDRt5iLXHTjMQO6rIVuGmzaHp0RIVpPvMQ86W2G9uCdJV6 stJwUyWp4Uj7e8sOvpNeEqjxI9YeuX9qkaLu2Qy3G+usqAQDk5medSwQIUx2cH0E/OBUVF5XA OhDhuHhz6uYmIyhyhJIFNC7OrGP5APHiwPnNr1ZQnFDiUfdZY6mZp4EoBACTEaVXZ1FqPir8E cCuqdL6l1hdek9u020LBzEI+1R/ijFpqdAw2bGpBvz34JN/0vU= 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 17:48:47 +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/ulp/iser/iser_initiator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 2a07692007bd..3ae2571ba5b4 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -452,10 +452,8 @@ int iser_send_data_out(struct iscsi_conn *conn, __func__,(int)itt,(int)data_seg_len,(int)buf_offset); tx_desc = kmem_cache_zalloc(ig.desc_cache, GFP_ATOMIC); - if (tx_desc == NULL) { - iser_err("Failed to alloc desc for post dataout\n"); + if (!tx_desc) return -ENOMEM; - } tx_desc->type = ISCSI_TX_DATAOUT; tx_desc->cqe.done = iser_dataout_comp;