Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753639AbdCHN3o (ORCPT ); Wed, 8 Mar 2017 08:29:44 -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 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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 999 Lines: 30 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 --- 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) -- 2.12.0