Skip to content

Commit

Permalink
usb: dwc3: Free event buffers array
Browse files Browse the repository at this point in the history
Array should be freed together with event buffers, since it was
allocated dynamically.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Anton Tikhomirov authored and Felipe Balbi committed Apr 10, 2012
1 parent db1d8ba commit 64b6c8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ static void dwc3_free_event_buffers(struct dwc3 *dwc)

for (i = 0; i < dwc->num_event_buffers; i++) {
evt = dwc->ev_buffs[i];
if (evt) {
if (evt)
dwc3_free_one_event_buffer(dwc, evt);
dwc->ev_buffs[i] = NULL;
}
}

kfree(dwc->ev_buffs);
}

/**
Expand Down

0 comments on commit 64b6c8a

Please sign in to comment.