From patchwork Wed Jan 24 11:17:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 10182147 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 9E327602B7 for ; Wed, 24 Jan 2018 11:22:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71666288D3 for ; Wed, 24 Jan 2018 11:22:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65F25288DF; Wed, 24 Jan 2018 11:22:44 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY 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 CB5E8288D3 for ; Wed, 24 Jan 2018 11:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933060AbeAXLWn (ORCPT ); Wed, 24 Jan 2018 06:22:43 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:59060 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932891AbeAXLWm (ORCPT ); Wed, 24 Jan 2018 06:22:42 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0OBM28S007071; Wed, 24 Jan 2018 11:22:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=6NQMyvS/WGnJoWNLdvHGBKMixLhb11ILjY/xUFZyX1M=; b=HsLmSQJjlNypvAAVgTDoOW0VzxUHYVsEDqcWwW4vvAtycCQMTFCO1dQOv42ZG4cjcHxL vptnF4dg/iMCkfB/2PZaISW9QwFbFcqIk/0MsDZlmREgqCcO+YjEKD6kZsC/nBXxGtuG 0Q19CdP+qcXAR8yWSM27G8Ytb9n4bY8A0QftEXJ78cfYnVwP00kH3NoCU4e2sHF4AFeZ RzJ3cksNLd+WFSEdllnC+1+aJ87zYUswV8s42ZOw+meRfN9VdwqR7g7k6AZDUCDiiyNF 4a0Sz3zMxUJrTb1HsieYu5WFPZlSSqB+DxDbI7sYODIWgqHy+258kb8mc1wwkIoPFGMK Yg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2fpra2r7sx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Jan 2018 11:22:36 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0OBHa3K024583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 24 Jan 2018 11:17:36 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w0OBHZXg016471; Wed, 24 Jan 2018 11:17:35 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 24 Jan 2018 03:17:35 -0800 From: Yuval Shaia To: aditr@vmware.com, pv-drivers@vmware.com, dledford@redhat.com, jgg@ziepe.ca, jgg@mellanox.com, linux-rdma@vger.kernel.org Cc: Yuval Shaia Subject: [PATCH] RDMA/vmw_pvrdma: Use standard way to check return value Date: Wed, 24 Jan 2018 13:17:21 +0200 Message-Id: <20180124111721.8170-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.14.3 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8783 signatures=668655 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=762 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801240154 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 To be compatible with other modules/drivers, change return code checks from "if (rc != 0)" to "if (rc)". Signed-off-by: Yuval Shaia --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c index d650a9fcde24..6f50220295c8 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c @@ -837,16 +837,16 @@ static int pvrdma_pci_probe(struct pci_dev *pdev, } /* Enable 64-Bit DMA */ - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) == 0) { + if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (ret != 0) { + if (ret) { dev_err(&pdev->dev, "pci_set_consistent_dma_mask failed\n"); goto err_free_resource; } } else { ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (ret != 0) { + if (ret) { dev_err(&pdev->dev, "pci_set_dma_mask failed\n"); goto err_free_resource;