From patchwork Sat Apr 22 14:49:51 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: 9694425 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 AECFF601E9 for ; Sat, 22 Apr 2017 14:50:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3FAC28174 for ; Sat, 22 Apr 2017 14:50:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A89DD28409; Sat, 22 Apr 2017 14:50:20 +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 37CDB28174 for ; Sat, 22 Apr 2017 14:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424940AbdDVOuP (ORCPT ); Sat, 22 Apr 2017 10:50:15 -0400 Received: from mout.web.de ([212.227.15.3]:57973 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424181AbdDVOuJ (ORCPT ); Sat, 22 Apr 2017 10:50:09 -0400 Received: from [192.168.1.2] ([77.181.100.232]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M5flQ-1c4cZO0KQy-00xXYp; Sat, 22 Apr 2017 16:49:54 +0200 Subject: [PATCH v2 09/12] IB/ocrdma: Delete an unnecessary variable assignment in ocrdma_alloc_mr() From: SF Markus Elfring To: Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier , Yuval Shaia , linux-rdma@vger.kernel.org Cc: LKML , kernel-janitors@vger.kernel.org References: <1492720999.3041.18.camel@redhat.com> <86425035-7da8-d2b1-8544-d4f7540d50c6@users.sourceforge.net> Message-ID: <78cdbeeb-5274-d315-33d3-4019f0eb35be@users.sourceforge.net> Date: Sat, 22 Apr 2017 16:49:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <86425035-7da8-d2b1-8544-d4f7540d50c6@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:Sbc9jJeJxRi8diqtkyOzc2L/+RJHCFiLfSAGO1w7tUscX856Hou Zqg29WCW/W65kbTxoQwAxHkeEAEBXQPx5dmSKka5vWp9PKPz1qeLmxE+oZyuNczvsWEqOra MmbCNczZG0QyuTfJ3mLp4jnkec5I/gfm8GHRYOqFwneywy44aXouE7QffkV4gn8oWXaRvm1 sWNE09g5aVXhm1FerpeFA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Fk6xVbc8Be0=:0OzOU8m+OE/KaAsYvZ51Ny rdhZw4yk2uZK0oGc/LW9FBa7nrp+HfTI80QtCLNfBkqSarb50M40UCPFAEmDIKOX0FZrlm4Me kyd4UFJfBVYYNqOyTS9FV8l6mKEnXe6V/mBRT6ppKK90H8Y/dIvgd1AI9x/fEFQPEClVuXrPj MerHmZzRJDb4FqT2vRlzCC4ae0I5t5P33x7HAxGrJS4ruzeMHa5jor6r8l1vS1pL4JOoQG5n3 a+fsf967R2SkjD2AqLlFt5HGXkFsCXeduNeGTnLafqDdKMMeTZjyyrjJwfFfeF5voc8wSqlPg u88XsKAN5xfzB0g31K8lmOo5vo0ENO8ZYz8FWKf1VPTQ3WIORi37A1f68f3QYzlrTdTt79tvL GR+gjzmTmuJa0Ji8vhNd/IjIPuGAyv1ZXDoV2h2aaxkPvQ7fR6DEiJTzpqC39S3kMIYsvLs2D M2jU9xIhkpnX2dZ5rhWaI0Mtljvuyqw7YGOdfaeP00QP0jfYN09bt4y+UQzKFk9hN3/3vxrWN p0fO1EG2f6y963tVc9OgrGvhK7ca9PqXGiEX05R9e8DrrGJI3vJ1Tveb7XyGC0hx4sNBKmR8r viwRUNttsZW2AJ5FHUZegANvHwXmUzV7IlWboksqaFMI7NyzlEddLGwNNwcQTiABZGG4gQh1b 6bJkchin6W/3RxDnhMzd2+QyD8H9pEkTqo+2Oteg6jMdvmbwVf97gmq9kE5Y2lFqKKOiD9Pu6 tJaLL6JQI1Rq6sgjbhTY5xD7bytjnAdQp3dRxG3OilJ3hy3w4G5+PnmIM89fowSnOMsVkXbaV jL56iI4 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, 22 Apr 2017 15:07:41 +0200 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 c804889db7e1..2dc399eeeefd 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -3022,10 +3022,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)