From patchwork Wed Jan 10 16:07: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: 10155537 X-Patchwork-Delegate: leon@leon.nu 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 7F5BE60231 for ; Wed, 10 Jan 2018 16:18:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71CF82854A for ; Wed, 10 Jan 2018 16:18:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66A0228558; Wed, 10 Jan 2018 16:18:11 +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 C39AD2854A for ; Wed, 10 Jan 2018 16:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754941AbeAJQSJ (ORCPT ); Wed, 10 Jan 2018 11:18:09 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:55996 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754747AbeAJQSI (ORCPT ); Wed, 10 Jan 2018 11:18:08 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0AGGgVI079549; Wed, 10 Jan 2018 16:17:33 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=7xZ5tQpzb5rFLzK1qEWuTAzBxOV3bpR7Z7K5eWZx9I8=; b=Ap9Zml6VhilUf2IyOBBZtHDcKkd3CN94e6reJCYfoQbh84rcC8ENfWPnifJEJKPiWbMm hUySHErnKkbgrRSXROklaitn9FioHpVLJmSy7LlB3QZJjBm3mLQRlrvcL5xBqxjwpqiz eCBlAPAsjwKUsTl62vvarSC9ho2mA7OsL4X2uOxDdDJrJs5olTppIQDUNZ0/n671h0zw tGnIUJ/WjM3y6VATkapj0CpsaT3mis4tdqqHfUSsdS34tfWGDszXKKjo2SZuEk+ZUmpn cL4gdGGgT6InD4ipuNAEmpZcgOcOLYKsyZ7iLtwL9rGkADufWqymfGlHbBR3eHEkG0nx YA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2fdp4682fb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jan 2018 16:17:32 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0AG7V62015430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Jan 2018 16:07:31 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w0AG7UY8015230; Wed, 10 Jan 2018 16:07:30 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 10 Jan 2018 08:07:30 -0800 From: Yuval Shaia To: dledford@redhat.com, leon@kernel.org, jgunthorpe@obsidianresearch.com, hal@dev.mellanox.co.il, linux-rdma@vger.kernel.org Cc: Yuval Shaia Subject: [PATCH] librdmacm: Set errno correctly if status is positive Date: Wed, 10 Jan 2018 18:07:21 +0200 Message-Id: <20180110160721.14469-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.14.3 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8769 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=869 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801100228 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 No need to convert to positive if status is already positive. Fixes: 1ef5c3a84 ("librdmacm: Set errno correctly in ucma_complete") Signed-off-by: Yuval Shaia --- librdmacm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librdmacm/cma.c b/librdmacm/cma.c index 25ebaaee..fb2dc5e4 100644 --- a/librdmacm/cma.c +++ b/librdmacm/cma.c @@ -866,7 +866,7 @@ int ucma_complete(struct rdma_cm_id *id) else if (id_priv->id.event->status < 0) ret = ERR(-id_priv->id.event->status); else - ret = ERR(-id_priv->id.event->status); + ret = ERR(id_priv->id.event->status); } return ret; }