From: Bo Shen <voice.shen@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] USB: gadget: atmel: zero out allocated requests
Date: Wed, 2 Jul 2014 10:03:45 +0800 [thread overview]
Message-ID: <53B36881.70109@atmel.com> (raw)
In-Reply-To: <1404255548-28212-1-git-send-email-swarren@wwwdotorg.org>
Hi Stephen Warren,
On 07/02/2014 06:59 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> 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>
> ---
> drivers/usb/gadget/atmel_usba_udc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks.
Acked-by: Bo Shen <voice.shen@atmel.com>
> diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
> index c99208d10200..2c709738a3cb 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;
>
>
Best Regards,
Bo Shen
prev parent reply other threads:[~2014-07-02 2:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 22:59 [U-Boot] [PATCH] USB: gadget: atmel: zero out allocated requests Stephen Warren
2014-07-02 2:03 ` Bo Shen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B36881.70109@atmel.com \
--to=voice.shen@atmel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.