Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205152
b: refs/heads/master
c: 831cd44
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Eric Anholt committed Aug 2, 2010
1 parent bce350a commit 482f789
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2bd34f6ca86b5a5f9b749624f73310820e7a93fd
refs/heads/master: 831cd4453598b2c8e193f077023910c6b0c39558
13 changes: 8 additions & 5 deletions trunk/drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static int intel_agp_map_memory(struct agp_memory *mem)
DBG("try mapping %lu pages\n", (unsigned long)mem->page_count);

if (sg_alloc_table(&st, mem->page_count, GFP_KERNEL))
return -ENOMEM;
goto err;

mem->sg_list = sg = st.sgl;

Expand All @@ -113,11 +113,14 @@ static int intel_agp_map_memory(struct agp_memory *mem)

mem->num_sg = pci_map_sg(intel_private.pcidev, mem->sg_list,
mem->page_count, PCI_DMA_BIDIRECTIONAL);
if (unlikely(!mem->num_sg)) {
intel_agp_free_sglist(mem);
return -ENOMEM;
}
if (unlikely(!mem->num_sg))
goto err;

return 0;

err:
sg_free_table(&st);
return -ENOMEM;
}

static void intel_agp_unmap_memory(struct agp_memory *mem)
Expand Down

0 comments on commit 482f789

Please sign in to comment.