aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp')
-rw-r--r--drivers/char/agp/intel-gtt.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 9344216183a4..f97122a53ca3 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -797,6 +797,10 @@ static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge)
797 797
798 /* we have to call this as early as possible after the MMIO base address is known */ 798 /* we have to call this as early as possible after the MMIO base address is known */
799 intel_i830_init_gtt_entries(); 799 intel_i830_init_gtt_entries();
800 if (intel_private.gtt_entries == 0) {
801 iounmap(intel_private.registers);
802 return -ENOMEM;
803 }
800 804
801 agp_bridge->gatt_table = NULL; 805 agp_bridge->gatt_table = NULL;
802 806
@@ -1279,6 +1283,11 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
1279 1283
1280 /* we have to call this as early as possible after the MMIO base address is known */ 1284 /* we have to call this as early as possible after the MMIO base address is known */
1281 intel_i830_init_gtt_entries(); 1285 intel_i830_init_gtt_entries();
1286 if (intel_private.gtt_entries == 0) {
1287 iounmap(intel_private.gtt);
1288 iounmap(intel_private.registers);
1289 return -ENOMEM;
1290 }
1282 1291
1283 agp_bridge->gatt_table = NULL; 1292 agp_bridge->gatt_table = NULL;
1284 1293
@@ -1387,6 +1396,11 @@ static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
1387 1396
1388 /* we have to call this as early as possible after the MMIO base address is known */ 1397 /* we have to call this as early as possible after the MMIO base address is known */
1389 intel_i830_init_gtt_entries(); 1398 intel_i830_init_gtt_entries();
1399 if (intel_private.gtt_entries == 0) {
1400 iounmap(intel_private.gtt);
1401 iounmap(intel_private.registers);
1402 return -ENOMEM;
1403 }
1390 1404
1391 agp_bridge->gatt_table = NULL; 1405 agp_bridge->gatt_table = NULL;
1392 1406