diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-02-27 16:34:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:59 -0500 |
commit | 7039f4224d4e40b06308d5c1a97427af1a142459 (patch) | |
tree | 4529171195b1008e8615bb4b39a129ddda463b16 /drivers/usb/gadget/dummy_hcd.c | |
parent | 80b6ca48321974a6566a1c9048ba34f60420bca6 (diff) |
[PATCH] USB: kzalloc() conversion in drivers/usb/gadget
this patch converts drivers/usb to kzalloc usage.
Compile tested with allyes config.
I think there was a bug in drivers/usb/gadget/inode.c because
it used sizeof(*data) for the kmalloc() and sizeof(data) for
the memset(), since sizeof(data) just returns the size for a pointer.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 9734cb76dd6c..42ce41d71b7f 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -478,10 +478,9 @@ dummy_alloc_request (struct usb_ep *_ep, gfp_t mem_flags) | |||
478 | return NULL; | 478 | return NULL; |
479 | ep = usb_ep_to_dummy_ep (_ep); | 479 | ep = usb_ep_to_dummy_ep (_ep); |
480 | 480 | ||
481 | req = kmalloc (sizeof *req, mem_flags); | 481 | req = kzalloc(sizeof(*req), mem_flags); |
482 | if (!req) | 482 | if (!req) |
483 | return NULL; | 483 | return NULL; |
484 | memset (req, 0, sizeof *req); | ||
485 | INIT_LIST_HEAD (&req->queue); | 484 | INIT_LIST_HEAD (&req->queue); |
486 | return &req->req; | 485 | return &req->req; |
487 | } | 486 | } |