diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-07-01 16:59:08 -0600 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-07-02 15:45:38 +0200 |
commit | 369d3c439a39dea6020e3a5ae25821b0832822da (patch) | |
tree | ee8718c8afea97f254ae408f95c2eeee40b6b084 | |
parent | 639e9903c20611772cb38433add6fe2383b9fabf (diff) | |
download | u-boot-imx-369d3c439a39dea6020e3a5ae25821b0832822da.zip u-boot-imx-369d3c439a39dea6020e3a5ae25821b0832822da.tar.gz u-boot-imx-369d3c439a39dea6020e3a5ae25821b0832822da.tar.bz2 |
USB: gadget: atmel: zero out allocated requests
A UDC's alloc_request method should zero out the newly allocated request.
Ensure the Atmel driver does so. This issue was found by code inspection,
following the investigation of an intermittent issue with ci_udc, which
was tracked down to failing to zero out allocated requests following some
of my changes. All other UDC drivers already zero out requests in one
way or another.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r-- | drivers/usb/gadget/atmel_usba_udc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index c99208d..2c70973 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -314,7 +314,7 @@ usba_ep_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags) DBG(DBG_GADGET, "ep_alloc_request: %p, 0x%x\n", _ep, gfp_flags); - req = malloc(sizeof(struct usba_request)); + req = calloc(1, sizeof(struct usba_request)); if (!req) return NULL; |