From patchwork Mon Dec 17 07:08:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10732797 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78ED7746 for ; Mon, 17 Dec 2018 07:08:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D0C5297D0 for ; Mon, 17 Dec 2018 07:08:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B626297D5; Mon, 17 Dec 2018 07:08:41 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 45A67297D0 for ; Mon, 17 Dec 2018 07:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbeLQHIj (ORCPT ); Mon, 17 Dec 2018 02:08:39 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:45610 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbeLQHIj (ORCPT ); Mon, 17 Dec 2018 02:08:39 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wBH74eq4157087; Mon, 17 Dec 2018 07:08:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=FzuJNA8nv/hw9jEPRMa2Sga6J5MlgRkJmjTG2opEF90=; b=UlIX4vb9XElJ6C/rrqSQzgRJavDU+YGvX4J0SP0QRK9LL1HwNNnWMTX1YPgqxDs/9Tu3 PjZVG+lUjS26Z58cNzCfBnn/gqKCkMJsEmis8EXyUNY+LUDG/MX9r3nkkg/kYatS3iWJ QyKTq2YkLk7JjTZN5axTx0lGrJq7ZX61pu5yqZNCtKHByrSXFR4b5bnaIt9/5SS0gZVr QA0jhXFkhnzPEzbDcOMggmSCWKrODvvT1aaOUTBUa2Rt3hx7Mehgo/x5QbQ1+pgnlc4/ Uwh7T3K+iEiIwrheQwWuHDO2UaKdF6tPSmIpB3oiyYJvwSM0lm8vh4+IGzRJLN+TT04K Rw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2pcs1tc6eu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Dec 2018 07:08:32 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wBH78Q8D022816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Dec 2018 07:08:26 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wBH78PZq029570; Mon, 17 Dec 2018 07:08:25 GMT Received: from kadam (/197.157.0.24) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 16 Dec 2018 23:08:25 -0800 Date: Mon, 17 Dec 2018 10:08:15 +0300 From: Dan Carpenter To: Lijun Ou Cc: "Wei Hu(Xavier)" , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] RDMA/hns: Fix an error code in hns_roce_create_srq() Message-ID: <20181217070815.GF12159@kadam> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9109 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=729 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812170067 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 The function accidentally returns success on this error path. Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode") Signed-off-by: Dan Carpenter --- drivers/infiniband/hw/hns/hns_roce_srq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_srq.c b/drivers/infiniband/hw/hns/hns_roce_srq.c index 463df60094e8..6377e734e28e 100644 --- a/drivers/infiniband/hw/hns/hns_roce_srq.c +++ b/drivers/infiniband/hw/hns/hns_roce_srq.c @@ -286,6 +286,7 @@ struct ib_srq *hns_roce_create_srq(struct ib_pd *pd, if (IS_ERR(srq->idx_que.umem)) { dev_err(hr_dev->dev, "ib_umem_get error for index queue\n"); + ret = PTR_ERR(srq->idx_que.umem); goto err_srq_mtt; }