diff options
author | Anton Tikhomirov <av.tikhomirov@samsung.com> | 2012-03-06 03:05:15 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-04-10 12:11:46 -0400 |
commit | 64b6c8a7019acc38cc6b37f8e72c1e915593b1bb (patch) | |
tree | de1108f6e80cae1a0d2bf9e58f9155b8d6d2f933 /drivers/usb | |
parent | db1d8ba36551bf55222c7961d9e9a1195a612fde (diff) |
usb: dwc3: Free event buffers array
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 7bd815a507e8..99b58d84553a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -206,11 +206,11 @@ static void dwc3_free_event_buffers(struct dwc3 *dwc) | |||
206 | 206 | ||
207 | for (i = 0; i < dwc->num_event_buffers; i++) { | 207 | for (i = 0; i < dwc->num_event_buffers; i++) { |
208 | evt = dwc->ev_buffs[i]; | 208 | evt = dwc->ev_buffs[i]; |
209 | if (evt) { | 209 | if (evt) |
210 | dwc3_free_one_event_buffer(dwc, evt); | 210 | dwc3_free_one_event_buffer(dwc, evt); |
211 | dwc->ev_buffs[i] = NULL; | ||
212 | } | ||
213 | } | 211 | } |
212 | |||
213 | kfree(dwc->ev_buffs); | ||
214 | } | 214 | } |
215 | 215 | ||
216 | /** | 216 | /** |