aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/net
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 21:29:43 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 14:49:59 -0800
commit80b6ca48321974a6566a1c9048ba34f60420bca6 (patch)
treea350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/net
parentd54a5cb6484705f7808b337917cc7598f2f971c3 (diff)
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/net')
-rw-r--r--drivers/usb/net/zd1201.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c
index f3a8e2807c3..fe9b60cd8d9 100644
--- a/drivers/usb/net/zd1201.c
+++ b/drivers/usb/net/zd1201.c
@@ -621,10 +621,9 @@ static int zd1201_drvr_start(struct zd1201 *zd)
__le16 zdmax;
unsigned char *buffer;
- buffer = kmalloc(ZD1201_RXSIZE, GFP_KERNEL);
+ buffer = kzalloc(ZD1201_RXSIZE, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
- memset(buffer, 0, ZD1201_RXSIZE);
usb_fill_bulk_urb(zd->rx_urb, zd->usb,
usb_rcvbulkpipe(zd->usb, zd->endp_in), buffer, ZD1201_RXSIZE,
@@ -1750,11 +1749,9 @@ static int zd1201_probe(struct usb_interface *interface,
usb = interface_to_usbdev(interface);
- zd = kmalloc(sizeof(struct zd1201), GFP_KERNEL);
- if (!zd) {
+ zd = kzalloc(sizeof(struct zd1201), GFP_KERNEL);
+ if (!zd)
return -ENOMEM;
- }
- memset(zd, 0, sizeof(struct zd1201));
zd->ap = ap;
zd->usb = usb;
zd->removed = 0;