From patchwork Wed Mar 8 13:22:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9611109 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 705A16046A for ; Wed, 8 Mar 2017 13:30:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BCB0281F9 for ; Wed, 8 Mar 2017 13:30:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3072828546; Wed, 8 Mar 2017 13:30:06 +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 E46ED281F9 for ; Wed, 8 Mar 2017 13:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753452AbdCHN3l (ORCPT ); Wed, 8 Mar 2017 08:29:41 -0500 Received: from mout.web.de ([212.227.15.3]:64367 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753599AbdCHN3j (ORCPT ); Wed, 8 Mar 2017 08:29:39 -0500 Received: from [192.168.1.2] ([92.228.144.238]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M25Bz-1by33k0wOJ-00txoF; Wed, 08 Mar 2017 14:22:23 +0100 Subject: [PATCH 20/26] IB/ocrdma: Delete an unnecessary variable assignment in ocrdma_alloc_mr() To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <24b6074a-f678-c367-484b-e16a0c1f9b5f@users.sourceforge.net> Date: Wed, 8 Mar 2017 14:22:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:5QQvi+lb1P+fcpzojzA7LVmbTLkjuYQ3cRw/guKUKVFjaisu81p yw1s85S/87kWKAjd327fwihS8DGj3XpvqTAiD85HoR7pCUtCmsbtJOQO21F1l/YN5IDQqfh APwvPyfZhHKAYZV4ralo/SVd9eG9tcJlin+rs5kNEQBQZRtYET8wHZvJUT2QI38awbpcRg2 5P45U6+S6Ees2CGUW5xCg== X-UI-Out-Filterresults: notjunk:1; V01:K0:XM6kUHzY3uY=:3CXAFUH4U9G3yCCCy4QEZg GBYXViSUc4smPV7qTeLpWBAaHPbtfd8cUl6y41FuZjKdgU3nzEIxc2f5+0hlMoYwm8V6YntTo Bdb7Yz3wvt+tTxIBClZ+Whs0EzeTf0vx3nr03ouzhn+An91ogwfYEj10HdDkAhOQFRN4TncmY GmtLM1n6yxHGSO4ZZapk2iAcKANQ5xFiEciSRU3X0+fovr3jiWjly1sgiAGAHbFXMsCwZO0O3 cfuKfydM2zsLpn/eWhNq02QRq3wNwQd+f/keNndSVSNJAfqjOLysLzN9PdJrb7kHf+iWLtND6 9XajzZXroMm7N0jPQKahr7siXkxcTY3zLgb7sgU/jOpw+RVuSsqMLjZPyU+Tnp1cxTdy9oi4p ep+D8axTuH9Bod3t37ME52A4eV4It7BsYk7P+I1PFBMKo952/AT73dDzHow/sgex6ja80iT3H eAPv0tWdsCaSmtecW5P5UH1DbyYBGBfnlVllkRaqk31VMblKcK/QHrexP7v/3jbDnGZGYdbvw 1vuo0Zwj2obpJI1oGZdZYzAekfDPvzLHVZ2gnSrw+gFPzv2AdG52F5l1J6MlUk/jX4qgOmG1O MihBtWaAV0vYQx0Ig2LfLaFepJEE3PTswaNEaEfG6mJpZDvj1P75yhSfnS+vbb5V6iTFUgevF sd/+XnlJ4r1NU9FoWiUyFvW7+6V4BKVCzqjnhAFiToOmkjf0mcVKgiz8TvChMLjzbcMPeugU2 lj1h/FCQEzLLBPDYY4btM9dFiiUoGQWB990ocVnyGjJFeF6xzVoArQJtBSXUM5PRZQFOzlntm EAAjx6q 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: Wed, 8 Mar 2017 10:00:41 +0100 Delete an assignment for the local variable "status" in an if branch because the desired failure indication is already specified by a constant error code at the end. Signed-off-by: Markus Elfring Acked-By: Devesh Sharma Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 05d55d361cfe..af8798fd35b1 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -3031,10 +3031,8 @@ struct ib_mr *ocrdma_alloc_mr(struct ib_pd *ibpd, return ERR_PTR(-ENOMEM); mr->pages = kcalloc(max_num_sg, sizeof(*mr->pages), GFP_KERNEL); - if (!mr->pages) { - status = -ENOMEM; + if (!mr->pages) goto pl_err; - } status = ocrdma_get_pbl_info(dev, mr, max_num_sg); if (status)