|
@@ -797,6 +797,10 @@ static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge)
|
|
|
|
|
|
/* we have to call this as early as possible after the MMIO base address is known */
|
|
|
intel_i830_init_gtt_entries();
|
|
|
+ if (intel_private.gtt_entries == 0) {
|
|
|
+ iounmap(intel_private.registers);
|
|
|
+ return -ENOMEM;
|
|
|
+ }
|
|
|
|
|
|
agp_bridge->gatt_table = NULL;
|
|
|
|
|
@@ -1279,6 +1283,11 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
|
|
|
|
|
|
/* we have to call this as early as possible after the MMIO base address is known */
|
|
|
intel_i830_init_gtt_entries();
|
|
|
+ if (intel_private.gtt_entries == 0) {
|
|
|
+ iounmap(intel_private.gtt);
|
|
|
+ iounmap(intel_private.registers);
|
|
|
+ return -ENOMEM;
|
|
|
+ }
|
|
|
|
|
|
agp_bridge->gatt_table = NULL;
|
|
|
|
|
@@ -1387,6 +1396,11 @@ static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
|
|
|
|
|
|
/* we have to call this as early as possible after the MMIO base address is known */
|
|
|
intel_i830_init_gtt_entries();
|
|
|
+ if (intel_private.gtt_entries == 0) {
|
|
|
+ iounmap(intel_private.gtt);
|
|
|
+ iounmap(intel_private.registers);
|
|
|
+ return -ENOMEM;
|
|
|
+ }
|
|
|
|
|
|
agp_bridge->gatt_table = NULL;
|
|
|
|