diff options
Diffstat (limited to 'drivers/char/agp/amd-k7-agp.c')
-rw-r--r-- | drivers/char/agp/amd-k7-agp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index b6b1568314c8..b1b4362bc648 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
@@ -309,7 +309,8 @@ static int amd_insert_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
309 | 309 | ||
310 | num_entries = A_SIZE_LVL2(agp_bridge->current_size)->num_entries; | 310 | num_entries = A_SIZE_LVL2(agp_bridge->current_size)->num_entries; |
311 | 311 | ||
312 | if (type != 0 || mem->type != 0) | 312 | if (type != mem->type || |
313 | agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) | ||
313 | return -EINVAL; | 314 | return -EINVAL; |
314 | 315 | ||
315 | if ((pg_start + mem->page_count) > num_entries) | 316 | if ((pg_start + mem->page_count) > num_entries) |
@@ -348,7 +349,8 @@ static int amd_remove_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
348 | unsigned long __iomem *cur_gatt; | 349 | unsigned long __iomem *cur_gatt; |
349 | unsigned long addr; | 350 | unsigned long addr; |
350 | 351 | ||
351 | if (type != 0 || mem->type != 0) | 352 | if (type != mem->type || |
353 | agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) | ||
352 | return -EINVAL; | 354 | return -EINVAL; |
353 | 355 | ||
354 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { | 356 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { |