linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / usb / net / zd1201.c
index 9b1e4ed..f3a8e28 100644 (file)
@@ -621,9 +621,10 @@ static int zd1201_drvr_start(struct zd1201 *zd)
        __le16 zdmax;
        unsigned char *buffer;
        
-       buffer = kzalloc(ZD1201_RXSIZE, GFP_KERNEL);
+       buffer = kmalloc(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,
@@ -1736,7 +1737,6 @@ static const struct iw_handler_def zd1201_iw_handlers = {
        .standard               = (iw_handler *)zd1201_iw_handler,
        .private                = (iw_handler *)zd1201_private_handler,
        .private_args           = (struct iw_priv_args *) zd1201_private_args,
-       .get_wireless_stats     = zd1201_get_wireless_stats,
 };
 
 static int zd1201_probe(struct usb_interface *interface,
@@ -1750,9 +1750,11 @@ static int zd1201_probe(struct usb_interface *interface,
 
        usb = interface_to_usbdev(interface);
 
-       zd = kzalloc(sizeof(struct zd1201), GFP_KERNEL);
-       if (!zd)
+       zd = kmalloc(sizeof(struct zd1201), GFP_KERNEL);
+       if (!zd) {
                return -ENOMEM;
+       }
+       memset(zd, 0, sizeof(struct zd1201));
        zd->ap = ap;
        zd->usb = usb;
        zd->removed = 0;
@@ -1797,6 +1799,7 @@ static int zd1201_probe(struct usb_interface *interface,
        zd->dev->open = zd1201_net_open;
        zd->dev->stop = zd1201_net_stop;
        zd->dev->get_stats = zd1201_get_stats;
+       zd->dev->get_wireless_stats = zd1201_get_wireless_stats;
        zd->dev->wireless_handlers =
            (struct iw_handler_def *)&zd1201_iw_handlers;
        zd->dev->hard_start_xmit = zd1201_hard_start_xmit;