From patchwork Tue Jun 14 21:54:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiraz Saleem X-Patchwork-Id: 9177013 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 B17516021C for ; Tue, 14 Jun 2016 21:55:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A146A28334 for ; Tue, 14 Jun 2016 21:55:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9620B2833B; Tue, 14 Jun 2016 21:55:04 +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 4C6FE28334 for ; Tue, 14 Jun 2016 21:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbcFNVzB (ORCPT ); Tue, 14 Jun 2016 17:55:01 -0400 Received: from mga02.intel.com ([134.134.136.20]:24004 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113AbcFNVzA (ORCPT ); Tue, 14 Jun 2016 17:55:00 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 14 Jun 2016 14:54:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,472,1459839600"; d="scan'208";a="975722918" Received: from ssaleem-mobl4.amr.corp.intel.com ([10.122.33.56]) by orsmga001.jf.intel.com with ESMTP; 14 Jun 2016 14:54:58 -0700 From: Shiraz Saleem To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, e1000-rdma@lists.sourceforge.net, Faisal Latif , Shiraz Saleem Subject: [PATCH 2/4] i40iw: Correct status check on i40iw_get_pble Date: Tue, 14 Jun 2016 16:54:17 -0500 Message-Id: <1465941259-4492-3-git-send-email-shiraz.saleem@intel.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1465941259-4492-1-git-send-email-shiraz.saleem@intel.com> References: <1465941259-4492-1-git-send-email-shiraz.saleem@intel.com> 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: Faisal Latif i40iw_get_pble returns 0 on success. Correct the check on return code. Signed-off-by: Faisal Latif Signed-off-by: Shiraz Saleem --- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index c6e75ac..65bea9c 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -1527,7 +1527,7 @@ static struct ib_mr *i40iw_alloc_mr(struct ib_pd *pd, mutex_lock(&iwdev->pbl_mutex); status = i40iw_get_pble(&iwdev->sc_dev, iwdev->pble_rsrc, palloc, iwmr->page_cnt); mutex_unlock(&iwdev->pbl_mutex); - if (!status) + if (status) goto err1; if (palloc->level != I40IW_LEVEL_1)