Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2651001ybh; Fri, 24 Jul 2020 19:55:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlrx15Oo3yhYCRtro4oZqNVtAb93HeWqpMVKlwfa8Ud20b63KY5YghopP3mCdU/x+Nfa3d X-Received: by 2002:a17:906:8d5:: with SMTP id o21mr12561436eje.155.1595645734793; Fri, 24 Jul 2020 19:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595645734; cv=none; d=google.com; s=arc-20160816; b=xZCNk0peH1NlfqdMWrA0qaI+6rJ7ExXOyNVAM78pM35DtKA3TypkgPnI6iYnuiXQZv 1bae5dnUv584bhXlvIHGt+Tb2fd2WUOWI14kayaz2aMjB7Bb1Nkzv7ficksiz5j/Azbk zym/RVZInl3pxz6x/w8WUZx3MZjTNXu+V6fUy73T8eE0jJl9HeRBwkq5qCLs/BPY0IfV ivSpOJZxhoIhHT8AuCkzrTayJ2FNVEl8RMi8tJtCnsCDYQJWO4fylW5TypYEjSgRxi6Y a2ZFX4sxhTFPsGVMjlwRyc3ezvaOJNxW47FauUP61WdSk0wq1djM5GqxVHphRANYxNK3 sDXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=MITpfhLf3SylnKLqgbE7GBTdYyUpmlx/rUcHCcoAcPM=; b=DwiwFKY45PlFB/LUy807KIAJkbzcQWRst+BzSMWqRYipGu20HPuzWkbC6j+7NChS3O FqbIkKv6piOFoGa8Ej9WfRI1LfBMO07Mvx9YIWCnB25xf/qtrSEJji7xq4ezJGWRkGCd BMOW0OIHremly6RdTCWdPfvrXG1euOsOg0JSz2wLwxJy4FQD2TYQ8KAipYc7dpniBkQF 4VJWbY/LRQ02kF6p0awHXyrqdem9PxjyK8nwl3kiTKDwgasho1NopE6EpDZCrqqLkZ1g aaoF3GqA/rTB9cYw4OMOzJ6U1dN+CcL3H7Vw8KEdi+zTdjr2Y1YNmdnR9Ss7oqEK7C0C M87w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si1483259ejc.533.2020.07.24.19.55.12; Fri, 24 Jul 2020 19:55:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726901AbgGYCzE (ORCPT + 99 others); Fri, 24 Jul 2020 22:55:04 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8809 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726592AbgGYCzC (ORCPT ); Fri, 24 Jul 2020 22:55:02 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EAE5F86362968DD56A2D; Sat, 25 Jul 2020 10:54:58 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Sat, 25 Jul 2020 10:54:57 +0800 From: Li Heng To: , CC: , Subject: [PATCH] RDMA/core: fix return error value to negative Date: Sat, 25 Jul 2020 10:56:27 +0800 Message-ID: <1595645787-20375-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes: 8d9ec9addd6c (IB/core: Add a sgid_attr pointer to struct rdma_ah_attr) Reported-by: Hulk Robot Signed-off-by: Li Heng --- drivers/infiniband/core/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 53d6505c..f369f0a 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -1712,7 +1712,7 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr, if (!(rdma_protocol_ib(qp->device, attr->alt_ah_attr.port_num) && rdma_protocol_ib(qp->device, port))) { - ret = EINVAL; + ret = -EINVAL; goto out; } } -- 2.7.4