Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325822
b: refs/heads/master
c: 05f2b39
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Greg Kroah-Hartman committed Aug 10, 2012
1 parent 5b1eb02 commit 6a2b777
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: e58ba01e2cfe7b7d54d28f78c7af3cff4d5419a3
refs/heads/master: 05f2b3912323b4130dbf6d5091601d9ca3aaf119
11 changes: 7 additions & 4 deletions trunk/drivers/usb/host/whci/qset.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ static int qset_add_urb_sg(struct whc *whc, struct whc_qset *qset, struct urb *u
int i;
int ntds = 0;
struct whc_std *std = NULL;
struct whc_page_list_entry *entry;
struct whc_page_list_entry *new_pl_virt;
dma_addr_t prev_end = 0;
size_t pl_len;
int p = 0;
Expand Down Expand Up @@ -508,12 +508,15 @@ static int qset_add_urb_sg(struct whc *whc, struct whc_qset *qset, struct urb *u

pl_len = std->num_pointers * sizeof(struct whc_page_list_entry);

std->pl_virt = krealloc(std->pl_virt, pl_len, mem_flags);
if (std->pl_virt == NULL) {
new_pl_virt = krealloc(std->pl_virt, pl_len, mem_flags);
if (new_pl_virt == NULL) {
kfree(std->pl_virt);
std->pl_virt = NULL;
return -ENOMEM;
}
std->pl_virt = new_pl_virt;

for (;p < std->num_pointers; p++, entry++) {
for (;p < std->num_pointers; p++) {
std->pl_virt[p].buf_ptr = cpu_to_le64(dma_addr);
dma_addr = (dma_addr + WHCI_PAGE_SIZE) & ~(WHCI_PAGE_SIZE-1);
}
Expand Down

0 comments on commit 6a2b777

Please sign in to comment.