summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/atmel_usba_udc.h
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-01-11 15:11:08 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-01-12 11:05:04 +0300
commit32856eea7bf75dfb99b955ada6e147f553a11366 (patch)
tree066483e73bb31b1ba14beafc8b296ca8edfb2c08 /drivers/usb/gadget/udc/atmel_usba_udc.h
parent8ae584d1951f241efd45499f8774fd7066f22823 (diff)
downloadlinux-32856eea7bf75dfb99b955ada6e147f553a11366.tar.xz
usb: gadget: udc: atmel: remove memory leak
Commit bbe097f092b0 ("usb: gadget: udc: atmel: fix endpoint name") introduced a memory leak when unbinding the driver. The endpoint names would not be freed. Solve that by including the name as a string in struct usba_ep so it is freed when the endpoint is. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/udc/atmel_usba_udc.h')
-rw-r--r--drivers/usb/gadget/udc/atmel_usba_udc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.h b/drivers/usb/gadget/udc/atmel_usba_udc.h
index 3e1c9d589dfa..b03b2ebfc53a 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.h
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.h
@@ -280,6 +280,7 @@ struct usba_ep {
void __iomem *ep_regs;
void __iomem *dma_regs;
void __iomem *fifo;
+ char name[8];
struct usb_ep ep;
struct usba_udc *udc;