diff mbox

agp/intel: put back check that we have a driver for the bridge.

Message ID 1271746061-21994-1-git-send-email-airlied@gmail.com
State Accepted
Headers show

Commit Message

Dave Airlie April 20, 2010, 6:47 a.m. UTC
None
diff mbox

Patch

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;