diff options
author | Felipe F. Tonello <eu@felipetonello.com> | 2015-11-10 17:52:05 +0000 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-12-15 09:12:41 -0600 |
commit | 079fe5a6da616891cca1a26e803e1df2a87e9ae5 (patch) | |
tree | 8de7bad5ce23cdc9837c8c697b608bc8533c909f /drivers/usb/gadget/function/f_midi.c | |
parent | bc1d3cdc9c3cbbd9040da8c53237e177c38048b0 (diff) | |
download | linux-079fe5a6da616891cca1a26e803e1df2a87e9ae5.tar.bz2 |
usb: gadget: define free_ep_req as universal function
This function is shared between gadget functions, so this avoid unnecessary
duplicated code and potentially avoid memory leaks.
Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_midi.c')
-rw-r--r-- | drivers/usb/gadget/function/f_midi.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 695cf75428e3..29bfca1a47bb 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -201,12 +201,6 @@ static inline struct usb_request *midi_alloc_ep_req(struct usb_ep *ep, return alloc_ep_req(ep, length, length); } -static void free_ep_req(struct usb_ep *ep, struct usb_request *req) -{ - kfree(req->buf); - usb_ep_free_request(ep, req); -} - static const uint8_t f_midi_cin_length[] = { 0, 0, 2, 3, 3, 1, 2, 3, 3, 3, 3, 3, 2, 2, 3, 1 }; |