Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp349842pxf; Thu, 8 Apr 2021 04:36:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziA/GOM/4Y5taw83zhTrub/tdgyaxON2KuJFjNmd1rghE1LZfrHnhWGnq2BZ3XCyKcqz9t X-Received: by 2002:aa7:cf03:: with SMTP id a3mr10682733edy.142.1617881779631; Thu, 08 Apr 2021 04:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617881779; cv=none; d=google.com; s=arc-20160816; b=00x0/vPsPE1JhvCH2GcQzBUuTh9I8OaXUR4+8wL9ZNm+ove8e61JB7YeZbxbV5Tj3M lZpLv7qfzYFIGTBrkm0UKoOysarIfmQRiqudLuVph3WlJCpMGwluVgldhZTWqHVVKb2C rNUKXWAtqjDMtw+jw75XIL+rZSZX+qUFVqwuudq7NZjHDsN3zaZK+lwKkYm1kFUekEbB /yJHhNJ9QZlceavVEfnY/LZ82ta10V+lT/lWKsjT65awAA4tZCjvviF8pzYfvlw55wm7 7OhOerg8bfEeZ2odQYdCmMkbH3L9zIaaeZ/8+Xxsp4u5llNsvon+0ewPe7CXKYGFMaz0 ye9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=JrcUFo3wsj8JhQ/MehNqp3BhlLlgvPZmOIcoESKsXBU=; b=n97JxudqyP42MFMt3/eDzApD9I6CnvzFOBeAr+/lOjGN9rFiVApoxC3HWg0PMkrqUk Jig4NTbMmqB26v0kcjb0viQjpd84CN/C5uiAKSqi2Tsb1eagKs8DT52Yq7dzexiXdj7t 8oyN6KnJekK5ePr7quVUMB6Z0tBlTi6d1QrXeNsN5XHy/TijaYL5ZDBZF7eAZvUOfwUM CmBcdAyiIz5X4toNgnASIFrOoImaCuHZfX6c1pg1afkFduuPm5nZIxge9y4ZlrMp65Jg lat4j6SQ5T83C4KrfjVjFOIGBQsopiPg4SxO6duRX7SQDVTwLgwj7379DUSWy77jPwuO 7VnA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si22297917ejc.691.2021.04.08.04.35.56; Thu, 08 Apr 2021 04:36:19 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231400AbhDHLer (ORCPT + 99 others); Thu, 8 Apr 2021 07:34:47 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15974 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231372AbhDHLeq (ORCPT ); Thu, 8 Apr 2021 07:34:46 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FGJyb17SYzyNLT; Thu, 8 Apr 2021 19:32:23 +0800 (CST) Received: from huawei.com (10.175.112.208) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Thu, 8 Apr 2021 19:34:24 +0800 From: Wang Wensheng To: , , , , , , , , , , CC: Subject: [PATCH -next] RDMA/bnxt_re: Fix error return code in bnxt_qplib_cq_process_terminal() Date: Thu, 8 Apr 2021 11:31:37 +0000 Message-ID: <20210408113137.97202-1-wangwensheng4@huawei.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.208] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Reported-by: Hulk Robot Signed-off-by: Wang Wensheng --- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 995d463..d4d4959 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -2784,6 +2784,7 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq, dev_err(&cq->hwq.pdev->dev, "FP: CQ Processed terminal reported rq_cons_idx 0x%x exceeds max 0x%x\n", cqe_cons, rq->max_wqe); + rc = -EINVAL; goto done; } -- 2.9.4