Staging: Use kcalloc or kzalloc
[safe/jmp/linux-2.6] / drivers / staging / otus / zdusb.c
index 6509bc5..2c799a2 100644 (file)
@@ -95,7 +95,7 @@ static int zfLnxProbe(struct usb_interface *interface,
         printk(KERN_NOTICE "USB 1.1 Host\n");
 #endif
 
-    macp = kmalloc(sizeof(struct usbdrv_private), GFP_KERNEL);
+    macp = kzalloc(sizeof(struct usbdrv_private), GFP_KERNEL);
     if (!macp)
     {
         printk(KERN_ERR "out of memory allocating device structure\n");
@@ -103,9 +103,6 @@ static int zfLnxProbe(struct usb_interface *interface,
         goto fail;
     }
 
-    /* Zero the memory */
-    memset(macp, 0, sizeof(struct usbdrv_private));
-
     net = alloc_etherdev(0);
 
     if (net == NULL)