From patchwork Sat Oct 23 00:09:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 278641 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9N09dtR004077 for ; Sat, 23 Oct 2010 00:09:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754890Ab0JWAJi (ORCPT ); Fri, 22 Oct 2010 20:09:38 -0400 Received: from vpn.pathscale.com ([198.186.3.75]:44849 "HELO mx.mv.qlogic.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with SMTP id S1752037Ab0JWAJi (ORCPT ); Fri, 22 Oct 2010 20:09:38 -0400 Received: from chromite.mv.qlogic.com (chromite.mv.qlogic.com [10.29.2.82]) by mx.mv.qlogic.com (Postfix) with ESMTP id F01E9143006C; Fri, 22 Oct 2010 17:09:30 -0700 (PDT) Received: from chromite.mv.qlogic.com (localhost.localdomain [127.0.0.1]) by chromite.mv.qlogic.com (Postfix) with ESMTP id BCF6414294D; Fri, 22 Oct 2010 17:09:30 -0700 (PDT) From: Ralph Campbell Subject: [PATCH] IB/qib: clean up properly if pci_set_consistent_dma_mask() fails To: Roland Dreier Cc: linux-rdma@vger.kernel.org Date: Fri, 22 Oct 2010 17:09:30 -0700 Message-ID: <20101023000925.30641.2559.stgit@chromite.mv.qlogic.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 23 Oct 2010 00:09:42 +0000 (UTC) diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 8a64426..48b6674 100644 --- a/drivers/infiniband/hw/qib/qib_pcie.c +++ b/drivers/infiniband/hw/qib/qib_pcie.c @@ -103,9 +103,11 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); } else ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (ret) + if (ret) { qib_early_err(&pdev->dev, "Unable to set DMA consistent mask: %d\n", ret); + goto bail; + } pci_set_master(pdev); ret = pci_enable_pcie_error_reporting(pdev);