Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338658
b: refs/heads/master
c: 68e5254
h: refs/heads/master
v: v3
  • Loading branch information
Julius Werner authored and Sarah Sharp committed Nov 12, 2012
1 parent b0a6c87 commit 582ed28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 4525c0a10dff7ad3669763c28016c7daffc3900e
refs/heads/master: 68e5254adb88bede68285f11fb442a4d34fb550c
9 changes: 7 additions & 2 deletions trunk/drivers/usb/host/xhci-mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ static int xhci_alloc_segments_for_ring(struct xhci_hcd *xhci,

next = xhci_segment_alloc(xhci, cycle_state, flags);
if (!next) {
xhci_free_segments_for_ring(xhci, *first);
prev = *first;
while (prev) {
next = prev->next;
xhci_segment_free(xhci, prev);
prev = next;
}
return -ENOMEM;
}
xhci_link_segments(xhci, prev, next, type);
Expand Down Expand Up @@ -258,7 +263,7 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
return ring;

fail:
xhci_ring_free(xhci, ring);
kfree(ring);
return NULL;
}

Expand Down

0 comments on commit 582ed28

Please sign in to comment.