summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/net2280.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 13:34:10 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 14:49:59 -0800
commit7039f4224d4e40b06308d5c1a97427af1a142459 (patch)
tree4529171195b1008e8615bb4b39a129ddda463b16 /drivers/usb/gadget/net2280.c
parent80b6ca48321974a6566a1c9048ba34f60420bca6 (diff)
downloadop-kernel-dev-7039f4224d4e40b06308d5c1a97427af1a142459.zip
op-kernel-dev-7039f4224d4e40b06308d5c1a97427af1a142459.tar.gz
[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/net2280.c')
-rw-r--r--drivers/usb/gadget/net2280.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index 67b13ab..fb73dc1 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -386,11 +386,10 @@ net2280_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
return NULL;
ep = container_of (_ep, struct net2280_ep, ep);
- req = kmalloc (sizeof *req, gfp_flags);
+ req = kzalloc(sizeof(*req), gfp_flags);
if (!req)
return NULL;
- memset (req, 0, sizeof *req);
req->req.dma = DMA_ADDR_INVALID;
INIT_LIST_HEAD (&req->queue);
OpenPOWER on IntegriCloud