From patchwork Sun Jun 23 01:07:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2766671 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D8031C0AB1 for ; Sun, 23 Jun 2013 01:07:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD48720116 for ; Sun, 23 Jun 2013 01:07:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE52E20111 for ; Sun, 23 Jun 2013 01:07:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825Ab3FWBHV (ORCPT ); Sat, 22 Jun 2013 21:07:21 -0400 Received: from mail-bk0-f51.google.com ([209.85.214.51]:43381 "EHLO mail-bk0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751775Ab3FWBHV (ORCPT ); Sat, 22 Jun 2013 21:07:21 -0400 Received: by mail-bk0-f51.google.com with SMTP id ji1so3783833bkc.24 for ; Sat, 22 Jun 2013 18:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=VAJju7AWopty6ZC23ocYOM4dg/U5GxuGMYZlWTvn2C8=; b=BwthU2WdVzOHciS9uDcsOpvC9hIJTcQP7PUoG7ucpTrs0ZE3+le6KFnWr9w9Dk5WRc Recg2wSi2ygs0CmflFOgT/NLfe95ALnx3wSMlS359QI5mzwSQ04rC0vjeXBRi23NdhWw T4bBgSNu4eR+JY31mO3Erbw4p5pwT8pUZP23eJYQaoV+RWoy8oTo8eDEKhtNpMXqJCGi FrVta8xJIcdSsKZ4OFwJ4TdiveIh6JtoGoP+j21E7N5jQCOAXsxoq/5EQHF1AUYrDADZ jv2R6vjTxnEU/g59f3g2kTknsu9u+0qIKI5p1JR2OGGar5ZU/9I54zhwPtQK1H7yRif5 6mUg== MIME-Version: 1.0 X-Received: by 10.204.191.72 with SMTP id dl8mr2796073bkb.56.1371949639846; Sat, 22 Jun 2013 18:07:19 -0700 (PDT) Received: by 10.205.122.72 with HTTP; Sat, 22 Jun 2013 18:07:19 -0700 (PDT) Date: Sun, 23 Jun 2013 09:07:19 +0800 Message-ID: Subject: [PATCH] RDMA/ocrdma: fix error return code in ocrdma_set_create_qp_rq_cmd() From: Wei Yongjun To: roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com Cc: yongjun_wei@trendmicro.com.cn, linux-rdma@vger.kernel.org Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return -ENOMEM in the alloc dma coherent error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 71942af..672aba2 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -1900,7 +1900,7 @@ static int ocrdma_set_create_qp_rq_cmd(struct ocrdma_create_qp_req *cmd, qp->rq.va = dma_alloc_coherent(&pdev->dev, len, &pa, GFP_KERNEL); if (!qp->rq.va) - return status; + return -ENOMEM; memset(qp->rq.va, 0, len); qp->rq.pa = pa; qp->rq.len = len;