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/lh7a40x_udc.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/lh7a40x_udc.c')
-rw-r--r-- | drivers/usb/gadget/lh7a40x_udc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 1a362c5e7f3d..0d3424eda038 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c | |||
@@ -1114,11 +1114,10 @@ static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, | |||
1114 | 1114 | ||
1115 | DEBUG("%s, %p\n", __FUNCTION__, ep); | 1115 | DEBUG("%s, %p\n", __FUNCTION__, ep); |
1116 | 1116 | ||
1117 | req = kmalloc(sizeof *req, gfp_flags); | 1117 | req = kzalloc(sizeof(*req), gfp_flags); |
1118 | if (!req) | 1118 | if (!req) |
1119 | return 0; | 1119 | return 0; |
1120 | 1120 | ||
1121 | memset(req, 0, sizeof *req); | ||
1122 | INIT_LIST_HEAD(&req->queue); | 1121 | INIT_LIST_HEAD(&req->queue); |
1123 | 1122 | ||
1124 | return &req->req; | 1123 | return &req->req; |