Skip to contentSkip to conversation

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

PATCH New Dave Airlie 1 participant 1 message Apr 20, 2010 Agpgart driver

lore
Share & tools
lore
#0 lore raw

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

From: Dave Airlie <[email protected]>

On my 945 laptop + radeon GPU, I was getting an oops on boot without this check which seems to have gotten dropped in the rework.

---
 drivers/char/agp/intel-agp.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/char/agp/intel-agp.c +8 -0
index 07a9aad..034644e 100644
@@ -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;
 
Signature · 1 line
1.6.6.1