From patchwork Tue Apr 20 06:47:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 93618 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3K6n5Lc025113 for ; Tue, 20 Apr 2010 06:49:40 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 007C09EEA1; Mon, 19 Apr 2010 23:49:04 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id B7DAD9E821 for ; Mon, 19 Apr 2010 23:49:03 -0700 (PDT) Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3K6n1QE019392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Apr 2010 02:49:01 -0400 Received: from localhost.localdomain (dhcp-0-222.bne.redhat.com [10.64.0.222]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3K6mxlW004865; Tue, 20 Apr 2010 02:49:00 -0400 From: Dave Airlie To: intel-gfx@lists.freedesktop.org Date: Tue, 20 Apr 2010 16:47:41 +1000 Message-Id: <1271746061-21994-1-git-send-email-airlied@gmail.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Cc: daniel.vetter@ffwll.ch Subject: [Intel-gfx] [PATCH] agp/intel: put back check that we have a driver for the bridge. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 20 Apr 2010 06:49:42 +0000 (UTC) diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 07a9aad..034644e 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -885,6 +885,14 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, return -ENODEV; } + if (!bridge->driver) { + if (cap_ptr) + dev_warn(&pdev->dev, "can't find bridge device (chip_id: %04x)\n", + intel_agp_chipsets[i].gmch_chip_id); + agp_put_bridge(bridge); + return -ENODEV; + } + bridge->dev = pdev; bridge->dev_private_data = NULL;