diff options
Diffstat (limited to 'drivers/usb/net/zd1201.c')
-rw-r--r-- | drivers/usb/net/zd1201.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index f3a8e2807c3b..fe9b60cd8d95 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) | |||
621 | __le16 zdmax; | 621 | __le16 zdmax; |
622 | unsigned char *buffer; | 622 | unsigned char *buffer; |
623 | 623 | ||
624 | buffer = kmalloc(ZD1201_RXSIZE, GFP_KERNEL); | 624 | buffer = kzalloc(ZD1201_RXSIZE, GFP_KERNEL); |
625 | if (!buffer) | 625 | if (!buffer) |
626 | return -ENOMEM; | 626 | return -ENOMEM; |
627 | memset(buffer, 0, ZD1201_RXSIZE); | ||
628 | 627 | ||
629 | usb_fill_bulk_urb(zd->rx_urb, zd->usb, | 628 | usb_fill_bulk_urb(zd->rx_urb, zd->usb, |
630 | usb_rcvbulkpipe(zd->usb, zd->endp_in), buffer, ZD1201_RXSIZE, | 629 | usb_rcvbulkpipe(zd->usb, zd->endp_in), buffer, ZD1201_RXSIZE, |
@@ -1750,11 +1749,9 @@ static int zd1201_probe(struct usb_interface *interface, | |||
1750 | 1749 | ||
1751 | usb = interface_to_usbdev(interface); | 1750 | usb = interface_to_usbdev(interface); |
1752 | 1751 | ||
1753 | zd = kmalloc(sizeof(struct zd1201), GFP_KERNEL); | 1752 | zd = kzalloc(sizeof(struct zd1201), GFP_KERNEL); |
1754 | if (!zd) { | 1753 | if (!zd) |
1755 | return -ENOMEM; | 1754 | return -ENOMEM; |
1756 | } | ||
1757 | memset(zd, 0, sizeof(struct zd1201)); | ||
1758 | zd->ap = ap; | 1755 | zd->ap = ap; |
1759 | zd->usb = usb; | 1756 | zd->usb = usb; |
1760 | zd->removed = 0; | 1757 | zd->removed = 0; |