aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/goku_udc.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 16:34:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:59 -0500
commit7039f4224d4e40b06308d5c1a97427af1a142459 (patch)
tree4529171195b1008e8615bb4b39a129ddda463b16 /drivers/usb/gadget/goku_udc.c
parent80b6ca48321974a6566a1c9048ba34f60420bca6 (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/goku_udc.c')
-rw-r--r--drivers/usb/gadget/goku_udc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index b0f3cd63e3b9..66b81bbf6bee 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -275,11 +275,10 @@ goku_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags)
275 275
276 if (!_ep) 276 if (!_ep)
277 return NULL; 277 return NULL;
278 req = kmalloc(sizeof *req, gfp_flags); 278 req = kzalloc(sizeof *req, gfp_flags);
279 if (!req) 279 if (!req)
280 return NULL; 280 return NULL;
281 281
282 memset(req, 0, sizeof *req);
283 req->req.dma = DMA_ADDR_INVALID; 282 req->req.dma = DMA_ADDR_INVALID;
284 INIT_LIST_HEAD(&req->queue); 283 INIT_LIST_HEAD(&req->queue);
285 return &req->req; 284 return &req->req;